1300
|
Is it possible to cancel or discard the values during validation
// ValidateValue event - Occurs before user changes the cell's value.
procedure TWinForm1.AxG2antt1_ValidateValue(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_ValidateValueEvent);
begin
with AxG2antt1 do
begin
OutputDebugString( 'ValidateValue' );
OutputDebugString( e.newValue );
OutputDebugString( 'Change the Cancel parameter for ValidateValue event to accept/decline the newly value. ' );
OutputDebugString( 'The DiscardValidateValue restores back the previously values.' );
DiscardValidateValue();
end
end;
with AxG2antt1 do
begin
BeginUpdate();
Chart.PaneWidth[True] := 0;
CauseValidateValue := EXG2ANTTLib.ValidateValueType.exValidateCell;
(Columns.Add('Date') as EXG2ANTTLib.Column).Editor.EditType := EXG2ANTTLib.EditTypeEnum.DateType;
(Columns.Add('Text') as EXG2ANTTLib.Column).Editor.EditType := EXG2ANTTLib.EditTypeEnum.EditType;
with Items do
begin
CellValue[TObject(AddItem('1/1/2001')),TObject(1)] := 'text';
CellValue[TObject(AddItem('1/1/2001')),TObject(1)] := 'text';
CellValue[TObject(AddItem('1/1/2001')),TObject(1)] := 'text';
CellValue[TObject(AddItem('1/1/2001')),TObject(1)] := 'text';
CellValue[TObject(AddItem('1/1/2001')),TObject(1)] := 'text';
end;
EndUpdate();
end
|
1299
|
Is it possible to validate the values of the cells only when user leaves the focused item
// ValidateValue event - Occurs before user changes the cell's value.
procedure TWinForm1.AxG2antt1_ValidateValue(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_ValidateValueEvent);
begin
with AxG2antt1 do
begin
OutputDebugString( 'ValidateValue' );
OutputDebugString( e.newValue );
OutputDebugString( 'Change the Cancel parameter for ValidateValue event to accept/decline the newly value. ' );
e.cancel := True;
OutputDebugString( 'You can not leave the item/record until the Cancel is False.' );
end
end;
with AxG2antt1 do
begin
BeginUpdate();
Chart.PaneWidth[True] := 0;
CauseValidateValue := EXG2ANTTLib.ValidateValueType.exValidateItem;
(Columns.Add('Date') as EXG2ANTTLib.Column).Editor.EditType := EXG2ANTTLib.EditTypeEnum.DateType;
(Columns.Add('Text') as EXG2ANTTLib.Column).Editor.EditType := EXG2ANTTLib.EditTypeEnum.EditType;
with Items do
begin
CellValue[TObject(AddItem('1/1/2001')),TObject(1)] := 'text';
CellValue[TObject(AddItem('1/1/2001')),TObject(1)] := 'text';
CellValue[TObject(AddItem('1/1/2001')),TObject(1)] := 'text';
CellValue[TObject(AddItem('1/1/2001')),TObject(1)] := 'text';
CellValue[TObject(AddItem('1/1/2001')),TObject(1)] := 'text';
end;
EndUpdate();
end
|
1298
|
We would like to validate the values of the cells. Is it possible
// ValidateValue event - Occurs before user changes the cell's value.
procedure TWinForm1.AxG2antt1_ValidateValue(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_ValidateValueEvent);
begin
with AxG2antt1 do
begin
OutputDebugString( 'ValidateValue' );
OutputDebugString( e.newValue );
OutputDebugString( 'Change the Cancel parameter for ValidateValue event to accept/decline the newly value.' );
e.cancel := True;
OutputDebugString( 'You can not leave the cell until the Cancel is False.' );
end
end;
with AxG2antt1 do
begin
BeginUpdate();
Chart.PaneWidth[True] := 0;
CauseValidateValue := EXG2ANTTLib.ValidateValueType.exValidateCell;
(Columns.Add('Date') as EXG2ANTTLib.Column).Editor.EditType := EXG2ANTTLib.EditTypeEnum.DateType;
(Columns.Add('Text') as EXG2ANTTLib.Column).Editor.EditType := EXG2ANTTLib.EditTypeEnum.EditType;
with Items do
begin
CellValue[TObject(AddItem('1/1/2001')),TObject(1)] := 'text';
CellValue[TObject(AddItem('1/1/2001')),TObject(1)] := 'text';
CellValue[TObject(AddItem('1/1/2001')),TObject(1)] := 'text';
CellValue[TObject(AddItem('1/1/2001')),TObject(1)] := 'text';
CellValue[TObject(AddItem('1/1/2001')),TObject(1)] := 'text';
end;
EndUpdate();
end
|
1297
|
Is there any way to add auto-numbering
with AxG2antt1 do
begin
with Columns do
begin
Add('Items');
with (Add('Pos') as EXG2ANTTLib.Column) do
begin
FormatColumn := '1 pos ''''';
Position := 0;
end;
end;
with Items do
begin
AddItem('Item 1');
AddItem('Item 2');
AddItem('Item 3');
end;
end
|
1296
|
How can I format my column to display the percent values “5,00%”
with AxG2antt1 do
begin
(Columns.Add('Percent') as EXG2ANTTLib.Column).FormatColumn := '((dbl(value) * 100) format ''2|,|3.'')+''%''';
with Items do
begin
AddItem(TObject(0.5));
AddItem(TObject(0.4));
AddItem(TObject(0.75));
end;
end
|
1295
|
I can't control bar's transparency if the bar is overlaid. What can be done

with AxG2antt1 do
begin
ScrollBySingleLine := True;
Columns.Add('Task');
DrawGridLines := EXG2ANTTLib.GridLinesEnum.exHLines;
with Chart do
begin
DrawGridLines := EXG2ANTTLib.GridLinesEnum.exHLines;
AllowCreateBar := EXG2ANTTLib.CreateBarEnum.exCreateBarAuto;
AllowLinkBars := False;
ResizeUnitScale := EXG2ANTTLib.UnitEnum.exHour;
PaneWidth[False] := 48;
FirstVisibleDate := '1/1/2001';
with Bars.Item['Task'] do
begin
OverlaidType := Integer(EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStackAutoArrange) Or Integer(EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStack);
Overlaid[EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsTransparent] := TObject(0);
end;
end;
with Items do
begin
h := AddItem('Task 1');
AddBar(h,'Task','1/2/2001','1/4/2001','A1',Nil);
ItemBar[h,'A1',EXG2ANTTLib.ItemBarPropertyEnum.exBarTransparent] := TObject(80);
AddBar(h,'Task','1/3/2001','1/5/2001','A2',Nil);
AddBar(h,'Task','1/4/2001','1/7/2001','A3',Nil);
h := AddItem('Task 2');
AddBar(h,'Task','1/7/2001','1/10/2001','A1',Nil);
AddBar(h,'Task','1/8/2001','1/12/2001','A3',Nil);
ItemBar[h,'A3',EXG2ANTTLib.ItemBarPropertyEnum.exBarTransparent] := TObject(50);
end;
end
|
1294
|
How can I show the child items with no identation

with AxG2antt1 do
begin
LinesAtRoot := EXG2ANTTLib.LinesAtRootEnum.exGroupLinesOutside;
Indent := 12;
HasLines := EXG2ANTTLib.HierarchyLineEnum.exThinLine;
Columns.Add('Default');
with Items do
begin
h := AddItem('Root 1');
InsertItem(h,Nil,'Child 1');
InsertItem(h,Nil,'Child 2');
InsertItem(h,Nil,'Child 3');
ExpandItem[h] := True;
h := AddItem('Root 2');
InsertItem(h,Nil,'Child 1');
InsertItem(h,Nil,'Child 2');
InsertItem(h,Nil,'Child 3');
end;
end
|
1293
|
Is there other ways of showing the hierarchy lines (exGroupLinesAtRoot)

with AxG2antt1 do
begin
LinesAtRoot := EXG2ANTTLib.LinesAtRootEnum.exGroupLinesAtRoot;
Indent := 12;
Columns.Add('Default');
with Items do
begin
h := AddItem('Root');
InsertItem(h,Nil,'Child 1');
InsertItem(h,Nil,'Child 2');
InsertItem(h,Nil,'Child 3');
ExpandItem[h] := True;
end;
end
|
1292
|
Is there other ways of showing the hierarchy lines (exGroupLinesOutside)

with AxG2antt1 do
begin
LinesAtRoot := EXG2ANTTLib.LinesAtRootEnum.exGroupLinesOutside;
Indent := 12;
Columns.Add('Default');
with Items do
begin
h := AddItem('Root 1');
InsertItem(h,Nil,'Child 1');
InsertItem(h,Nil,'Child 2');
InsertItem(h,Nil,'Child 3');
ExpandItem[h] := True;
h := AddItem('Root 2');
InsertItem(h,Nil,'Child 1');
InsertItem(h,Nil,'Child 2');
InsertItem(h,Nil,'Child 3');
end;
end
|
1291
|
Is there other ways of showing the hierarchy lines (exGroupLinesInsideLeaf)

with AxG2antt1 do
begin
LinesAtRoot := EXG2ANTTLib.LinesAtRootEnum.exGroupLinesInsideLeaf;
Indent := 12;
Columns.Add('Default');
with Items do
begin
h := AddItem('Root');
InsertItem(h,Nil,'Child 1');
InsertItem(h,Nil,'Child 2');
InsertItem(h,Nil,'Child 3');
ExpandItem[h] := True;
end;
end
|
1290
|
Is there other ways of showing the hierarchy lines (exGroupLinesInside)

with AxG2antt1 do
begin
LinesAtRoot := EXG2ANTTLib.LinesAtRootEnum.exGroupLinesInside;
Indent := 12;
Columns.Add('Default');
with Items do
begin
h := AddItem('Root');
InsertItem(h,Nil,'Child 1');
InsertItem(h,Nil,'Child 2');
InsertItem(h,Nil,'Child 3');
ExpandItem[h] := True;
end;
end
|
1289
|
Is there other ways of showing the hierarchy lines (exGroupLines)

with AxG2antt1 do
begin
LinesAtRoot := EXG2ANTTLib.LinesAtRootEnum.exGroupLines;
Indent := 12;
Columns.Add('Default');
with Items do
begin
h := AddItem('Root');
InsertItem(h,Nil,'Child 1');
InsertItem(InsertItem(h,Nil,'Child 2'),Nil,'SubChild 2');
InsertItem(h,Nil,'Child 3');
ExpandItem[h] := True;
end;
end
|
1288
|
How can I specify non-working dates for any year, as a repetitive expression for instance

with AxG2antt1 do
begin
with Chart do
begin
AdjustLevelsToBase := True;
PaneWidth[False] := 0;
FirstVisibleDate := '12/24/2010';
FirstWeekDay := EXG2ANTTLib.WeekDayEnum.exMonday;
LevelCount := 2;
NonworkingDays := 0;
AddNonworkingDate('shortdateF(value) left 5 in (''01/01'',''01/06'',''04/25'',''05/01'',''06/02'',''08/15'',''11/01'',''12/08'',''12/25'',''12/26'')');
end;
end
|
1287
|
Is it possible to specify the Easter and a day after as being non-working
with AxG2antt1 do
begin
with Chart do
begin
AdjustLevelsToBase := True;
PaneWidth[False] := 0;
FirstVisibleDate := '4/14/2011';
FirstWeekDay := EXG2ANTTLib.WeekDayEnum.exMonday;
LevelCount := 2;
NonworkingDays := 0;
AddNonworkingDate('not(month(value) in (3,4,5)) ? 0 : ( floor(value)=(2:=floor(date(dateS(''3/1/'' + year(value)) + ((1:=(((255 - 11 * (year(value) m' +
'od 19)) - 21) mod 30) + 21) + (=:1 > 48 ? -1 : 0) + 6 - ((year(value) + int(year(value) / 4)) + =:1 + (=:1 > 48 ? -1 : 0) + 1) m' +
'od 7)))) or (floor(value)= =:2 + 1))');
end;
end
|
1286
|
Here's a simple sample to compute the Easter day
with AxG2antt1 do
begin
BeginUpdate();
Chart.PaneWidth[True] := 0;
with (Columns.Add('Year') as EXG2ANTTLib.Column).Editor do
begin
EditType := EXG2ANTTLib.EditTypeEnum.SpinType;
Numeric := EXG2ANTTLib.NumericEnum.exInteger;
end;
(Columns.Add('Easter') as EXG2ANTTLib.Column).ComputedField := 'date(dateS(''3/1/'' + int(%0)) + ((1:=(((255 - 11 * (int(%0) mod 19)) - 21) mod 30) + 21) + (=:1 > 48 ? -1 : 0) + 6 - ((int(%0) + ' +
'int(int(%0) / 4)) + =:1 + (=:1 > 48 ? -1 : 0) + 1) mod 7))';
with Items do
begin
AddItem(TObject(2008));
AddItem(TObject(2009));
AddItem(TObject(2010));
AddItem(TObject(2011));
end;
EndUpdate();
end
|
1285
|
How do I specify the Easter or holydays as non-working
with AxG2antt1 do
begin
with Chart do
begin
AdjustLevelsToBase := True;
PaneWidth[False] := 0;
FirstVisibleDate := '4/14/2011';
FirstWeekDay := EXG2ANTTLib.WeekDayEnum.exMonday;
LevelCount := 2;
NonworkingDays := 0;
AddNonworkingDate('month(value) = 7');
AddNonworkingDate('not(month(value) in (3,4)) ? 0 : ( floor(value)=floor(date(dateS(''3/1/'' + year(value)) + ((1:=(((255 - 11 * (year(value) mod 19)' +
') - 21) mod 30) + 21) + (=:1 > 48 ? -1 : 0) + 6 - ((year(value) + int(year(value) / 4)) + =:1 + (=:1 > 48 ? -1 : 0) + 1) mod 7))' +
'))');
end;
end
|
1284
|
Is it possible to add a repetitive expression to define non-working dates
with AxG2antt1 do
begin
with Chart do
begin
PaneWidth[False] := 0;
FirstVisibleDate := '1/1/2010';
FirstWeekDay := EXG2ANTTLib.WeekDayEnum.exMonday;
LevelCount := 2;
AddNonworkingDate('1/13/2010');
AddNonworkingDate('month(value) = 1 and (day(value) in (1,6))');
end;
end
|
1283
|
How do I get the Easter date
with AxG2antt1 do
begin
(Columns.Add('Easter') as EXG2ANTTLib.Column).FormatColumn := 'date(dateS(''3/1/'' + year(value)) + ((1:=(((255 - 11 * (year(value) mod 19)) - 21) mod 30) + 21) + (=:1 > 48 ? -1 : 0) + 6 - ((y' +
'ear(value) + int(year(value) / 4)) + =:1 + (=:1 > 48 ? -1 : 0) + 1) mod 7))';
with Items do
begin
AddItem('1/1/1989');
AddItem('1/1/2001');
AddItem('1/1/2002');
AddItem('1/1/2003');
AddItem('1/1/2010');
end;
end
|
1282
|
How can I calculate the number of visible units
// Click event - Occurs when the user presses and then releases the left mouse button over the tree control.
procedure TWinForm1.AxG2antt1_ClickEvent(sender: System.Object; e: System.EventArgs);
begin
with AxG2antt1 do
begin
with Chart do
begin
OutputDebugString( 'UnitCount:' );
OutputDebugString( CountVisibleUnits[TObject(DateFromPoint[0,-1]),TObject(DateFromPoint[1,-1])] );
end;
end
end;
with AxG2antt1 do
begin
with Chart do
begin
PaneWidth[False] := 0;
FirstVisibleDate := '1/1/2010';
LevelCount := 2;
end;
end
|
1281
|
Is it possible to specify the nonworking up to minutes and I can see when using the inside zoom feature

with AxG2antt1 do
begin
BeginUpdate();
Chart.Bars.Add('Task:Split').Shortcut := 'Task';
DrawGridLines := EXG2ANTTLib.GridLinesEnum.exHLines;
with Chart do
begin
DrawGridLines := EXG2ANTTLib.GridLinesEnum.exAllLines;
PaneWidth[False] := 128;
LevelCount := 3;
UnitScale := EXG2ANTTLib.UnitEnum.exHour;
UnitWidth := 16;
DrawLevelSeparator := EXG2ANTTLib.LevelLineEnum.exLevelNoLine;
with Level[2] do
begin
Unit := EXG2ANTTLib.UnitEnum.exMinute;
Count := 60;
end;
AllowCreateBar := EXG2ANTTLib.CreateBarEnum.exCreateBarAuto;
ResizeUnitScale := EXG2ANTTLib.UnitEnum.exMinute;
ResizeUnitCount := 15;
AllowInsideZoom := True;
with DefaultInsideZoomFormat do
begin
InsideUnit := EXG2ANTTLib.UnitEnum.exMinute;
InsideCount := 15;
InsideLabel := '<%nn%>';
OwnerLabel := 'Hour: <b><%h%>';
DrawGridLines := True;
end;
InsideZooms.Add('1/1/2010 12:00:00 PM');
InsideZooms.Add('1/1/2010 1:00:00 PM');
FirstVisibleDate := '1/1/2010 9:00:00 AM';
end;
(Columns.Add('Non-Working') as EXG2ANTTLib.Column).Def[EXG2ANTTLib.DefColumnEnum.exCellSingleLine] := TObject(False);
with Items do
begin
h := AddItem('12:30 to 14:00 Monday to Thursday, 12:30 to 13:30 on Friday');
ItemNonworkingUnits[h,TObject(False)] := 'weekday(value) case (default:((timeF(value)>="12:30:00" and timeF(value) <="14:00:00" ));5:( timeF(value)>="12:30:00" and timeF(' +
'value) <="13:30:00" );6:1;0:1) ';
h := AddItem('10:45 to 13:45 Monday to Thursday, 10:45 to 14:30 on Friday');
ItemNonworkingUnits[h,TObject(False)] := 'weekday(value) case (default:((timeF(value)>="10:45:00" and timeF(value) <="13:45:00" ));5:( timeF(value)>="10:45:00" and timeF(' +
'value) <="14:30:00" );6:1;0:1) ';
h := AddItem('2:30 to 9:30 on Friday, Saturday and Sunday');
ItemNonworkingUnits[h,TObject(False)] := 'weekday(value) case (default:((timeF(value)>="02:30:00" and timeF(value) <="09:30:00" ));1:0;2:0;3:0;4:0) ';
end;
EndUpdate();
end
|
1280
|
Is it possible to show the non-working units up to minutes

with AxG2antt1 do
begin
BeginUpdate();
Chart.Bars.Add('Task:Split').Shortcut := 'Task';
DrawGridLines := EXG2ANTTLib.GridLinesEnum.exHLines;
with Chart do
begin
DrawGridLines := EXG2ANTTLib.GridLinesEnum.exHLines;
PaneWidth[False] := 128;
FirstVisibleDate := '1/1/2010';
LevelCount := 2;
UnitScale := EXG2ANTTLib.UnitEnum.exHour;
UnitWidth := 16;
DrawLevelSeparator := EXG2ANTTLib.LevelLineEnum.exLevelNoLine;
with Level[1] do
begin
Unit := EXG2ANTTLib.UnitEnum.exMinute;
Count := 60;
end;
AllowCreateBar := EXG2ANTTLib.CreateBarEnum.exCreateBarAuto;
ResizeUnitScale := EXG2ANTTLib.UnitEnum.exMinute;
ResizeUnitCount := 15;
end;
(Columns.Add('Non-Working') as EXG2ANTTLib.Column).Def[EXG2ANTTLib.DefColumnEnum.exCellSingleLine] := TObject(False);
with Items do
begin
h := AddItem('12:30 to 14:00 Monday to Thursday, 12:30 to 13:30 on Friday');
ItemNonworkingUnits[h,TObject(False)] := 'weekday(value) case (default:((timeF(value)>="12:30:00" and timeF(value) <="14:00:00" ));5:( timeF(value)>="12:30:00" and timeF(' +
'value) <="13:30:00" );6:1;0:1) ';
h := AddItem('10:45 to 13:45 Monday to Thursday, 10:45 to 14:30 on Friday');
ItemNonworkingUnits[h,TObject(False)] := 'weekday(value) case (default:((timeF(value)>="10:45:00" and timeF(value) <="13:45:00" ));5:( timeF(value)>="10:45:00" and timeF(' +
'value) <="14:30:00" );6:1;0:1) ';
h := AddItem('2:30 to 9:30 on Friday, Saturday and Sunday');
ItemNonworkingUnits[h,TObject(False)] := 'weekday(value) case (default:((timeF(value)>="02:30:00" and timeF(value) <="09:30:00" ));1:0;2:0;3:0;4:0) ';
end;
EndUpdate();
end
|
1279
|
Is it possible to define several type of progress bars

with AxG2antt1 do
begin
BeginUpdate();
Columns.Add('Tasks');
(Columns.Add('Start') as EXG2ANTTLib.Column).Visible := False;
(Columns.Add('End') as EXG2ANTTLib.Column).Visible := False;
with Chart do
begin
FirstVisibleDate := '9/20/2006';
PaneWidth[False] := 64;
with Bars.Copy('Progress','ProgressT') do
begin
Color := $ff;
Shape := EXG2ANTTLib.ShapeBarEnum.exShapeSolid;
Height := 7;
end;
Bars.Add('Task%ProgressT:Split').Shortcut := 'Task';
with Bars.Item['Progress'] do
begin
Color := $ff0000;
Shape := EXG2ANTTLib.ShapeBarEnum.exShapeSolidUp;
end;
Bars.Add('Summary%Progress').Shortcut := 'Summary';
end;
with Items do
begin
h := AddItem('Project');
ItemHeight[h] := 16;
CellValue[TObject(h),TObject(1)] := '9/21/2006';
CellValue[TObject(h),TObject(2)] := '10/3/2006';
AddBar(h,'Summary',CellValue[TObject(h),TObject(1)],CellValue[TObject(h),TObject(2)],'sum',Nil);
ItemBar[h,'sum',EXG2ANTTLib.ItemBarPropertyEnum.exBarPercent] := TObject(0.4);
ItemBar[h,'sum',EXG2ANTTLib.ItemBarPropertyEnum.exBarShowPercentCaption] := TObject(True);
h1 := InsertItem(h,Nil,'Task 1');
CellValue[TObject(h1),TObject(1)] := CellValue[TObject(h),TObject(1)];
CellValue[TObject(h1),TObject(2)] := '9/27/2006';
AddBar(h1,'Task',CellValue[TObject(h1),TObject(1)],CellValue[TObject(h1),TObject(2)],'K1',Nil);
ItemBar[h1,'K1',EXG2ANTTLib.ItemBarPropertyEnum.exBarPercent] := TObject(0.6);
ItemBar[h1,'K1',EXG2ANTTLib.ItemBarPropertyEnum.exBarShowPercentCaption] := TObject(True);
h2 := InsertItem(h,Nil,'Task 2');
CellValue[TObject(h2),TObject(1)] := CellValue[TObject(h1),TObject(2)];
CellValue[TObject(h2),TObject(2)] := '9/28/2006';
AddBar(h2,'Unknown',CellValue[TObject(h2),TObject(1)],CellValue[TObject(h2),TObject(2)],'K2',Nil);
AddLink('L1',h1,'K1',h2,'K2');
h3 := InsertItem(h,Nil,'Task 3');
CellValue[TObject(h3),TObject(1)] := CellValue[TObject(h2),TObject(2)];
CellValue[TObject(h3),TObject(2)] := CellValue[TObject(h),TObject(2)];
AddBar(h3,'Task',CellValue[TObject(h3),TObject(1)],CellValue[TObject(h3),TObject(2)],'K3',Nil);
ItemBar[h3,'K3',EXG2ANTTLib.ItemBarPropertyEnum.exBarPercent] := TObject(0.65);
ItemBar[h3,'K3',EXG2ANTTLib.ItemBarPropertyEnum.exBarShowPercentCaption] := TObject(True);
ItemBar[h3,'K3',EXG2ANTTLib.ItemBarPropertyEnum.exBarPercentColor] := TObject(32768);
AddLink('L2',h2,'K2',h3,'K3');
GroupBars(h1,'K1',False,h2,'K2',True,TObject(31),'0;4');
GroupBars(h2,'K2',False,h3,'K3',True,TObject(31),'0;2');
DefineSummaryBars(h,'sum',h1,'K1');
DefineSummaryBars(h,'sum',h2,'K2');
DefineSummaryBars(h,'sum',h3,'K3');
ExpandItem[h] := True;
ItemBold[h] := True;
end;
EndUpdate();
end
|
1278
|
Is it possible to display the percent bar over the summary bar

with AxG2antt1 do
begin
BeginUpdate();
Columns.Add('Task');
with Chart do
begin
LevelCount := 2;
PaneWidth[False] := 64;
FirstVisibleDate := '1/1/2001';
with Bars.Item['Progress'] do
begin
Color := $ff0000;
Shape := EXG2ANTTLib.ShapeBarEnum.exShapeSolidUp;
end;
Bars.Add('Summary%Progress').Shortcut := 'SummaryP';
end;
with Items do
begin
h := AddItem('Summary');
AddBar(h,'SummaryP','1/2/2001','1/6/2001','K1',Nil);
ItemBar[h,'K1',EXG2ANTTLib.ItemBarPropertyEnum.exBarPercent] := TObject(0.4);
ItemBar[h,'K1',EXG2ANTTLib.ItemBarPropertyEnum.exBarShowPercentCaption] := TObject(True);
end;
EndUpdate();
end
|
1277
|
How can I display the percent value in the lower side of the bar

with AxG2antt1 do
begin
BeginUpdate();
Columns.Add('Task');
with Chart do
begin
PaneWidth[False] := 48;
FirstVisibleDate := '1/1/2001';
with Bars.Item['Progress'] do
begin
Shape := EXG2ANTTLib.ShapeBarEnum.exShapeSolid;
Height := 7;
Color := $ff0000;
end;
Bars.Add('Task%Progress').Shortcut := 'Percent';
end;
with Items do
begin
h := AddItem('Task 1');
AddBar(h,'Percent','1/2/2001','1/6/2001','K1',Nil);
ItemBar[h,'K1',EXG2ANTTLib.ItemBarPropertyEnum.exBarPercent] := TObject(0.5);
ItemBar[h,'K1',EXG2ANTTLib.ItemBarPropertyEnum.exBarShowPercentCaption] := TObject(True);
ItemBar[h,'K1',EXG2ANTTLib.ItemBarPropertyEnum.exBarVAlignPercent] := TObject(2);
h := AddItem('Task 2');
AddBar(h,'Percent','1/3/2001','1/9/2001','K2',Nil);
end;
EndUpdate();
end
|
1276
|
Is it possible to change the percent's height

with AxG2antt1 do
begin
BeginUpdate();
Columns.Add('Task');
with Chart do
begin
PaneWidth[False] := 48;
FirstVisibleDate := '1/1/2001';
with Bars.Item['Progress'] do
begin
Shape := EXG2ANTTLib.ShapeBarEnum.exShapeSolid;
Height := 7;
end;
Bars.Add('Task%Progress');
end;
with Items do
begin
h := AddItem('Task 1');
AddBar(h,'Task%Progress','1/2/2001','1/6/2001','K1',Nil);
ItemBar[h,'K1',EXG2ANTTLib.ItemBarPropertyEnum.exBarPercent] := TObject(0.5);
ItemBar[h,'K1',EXG2ANTTLib.ItemBarPropertyEnum.exBarShowPercentCaption] := TObject(True);
end;
EndUpdate();
end
|
1275
|
How can I change the pattern for the percent bar

with AxG2antt1 do
begin
BeginUpdate();
Columns.Add('Task');
with Chart do
begin
PaneWidth[False] := 48;
FirstVisibleDate := '1/1/2001';
with Bars.Item['Progress'] do
begin
Pattern := EXG2ANTTLib.PatternEnum.exPatternBDiagonal;
Shape := EXG2ANTTLib.ShapeBarEnum.exShapeSolid;
Color := $c4;
end;
Bars.Add('Task%Progress');
end;
with Items do
begin
h := AddItem('Task 1');
AddBar(h,'Task%Progress','1/2/2001','1/6/2001','K1',Nil);
ItemBar[h,'K1',EXG2ANTTLib.ItemBarPropertyEnum.exBarPercent] := TObject(0.4);
ItemBar[h,'K1',EXG2ANTTLib.ItemBarPropertyEnum.exBarShowPercentCaption] := TObject(True);
end;
EndUpdate();
end
|
1274
|
How can I change the look for the percent bar using EBN

with AxG2antt1 do
begin
BeginUpdate();
VisualAppearance.Add(1,'c:\exontrol\images\hot.ebn');
Columns.Add('Task');
with Chart do
begin
FirstVisibleDate := '1/1/2001';
with Bars.Item['Progress'] do
begin
Color := $1000000;
Shape := EXG2ANTTLib.ShapeBarEnum.exShapeSolid;
Height := 7;
end;
Bars.Add('Task%Progress');
end;
with Items do
begin
h := AddItem('Task 1');
AddBar(h,'Task%Progress','1/2/2001','1/6/2001','K1',Nil);
ItemBar[h,'K1',EXG2ANTTLib.ItemBarPropertyEnum.exBarPercent] := TObject(0.4);
end;
EndUpdate();
end
|
1273
|
Is it possible to align the percent bar to the bottom of the bar

with AxG2antt1 do
begin
BeginUpdate();
DefaultItemHeight := 32;
Columns.Add('Task');
with Chart do
begin
PaneWidth[False] := 64;
FirstVisibleDate := '1/1/2001';
Bars.Item['Task'].Height := 28;
Bars.Add('Task%Progress').Shortcut := 'Percent';
end;
with Items do
begin
h := AddItem('Task 1');
AddBar(h,'Percent','1/2/2001','1/14/2001','K1','text inside');
ItemBar[h,'K1',EXG2ANTTLib.ItemBarPropertyEnum.exBarVAlignCaption] := TObject(0);
ItemBar[h,'K1',EXG2ANTTLib.ItemBarPropertyEnum.exBarPercent] := TObject(0.75);
ItemBar[h,'K1',EXG2ANTTLib.ItemBarPropertyEnum.exBarShowPercentCaption] := TObject(True);
ItemBar[h,'K1',EXG2ANTTLib.ItemBarPropertyEnum.exBarPercentCaptionFormat] := '%p%';
ItemBar[h,'K1',EXG2ANTTLib.ItemBarPropertyEnum.exBarVAlignPercent] := TObject(2);
end;
EndUpdate();
end
|
1272
|
Is it possible to show the percent on the bottom side of the bar, so I can leave the text upside

with AxG2antt1 do
begin
BeginUpdate();
DefaultItemHeight := 32;
Columns.Add('Task');
with Chart do
begin
PaneWidth[False] := 64;
FirstVisibleDate := '1/1/2001';
with Bars do
begin
Item['Task'].Height := 28;
with Item['Progress'] do
begin
Shape := EXG2ANTTLib.ShapeBarEnum.exShapeThinDown;
Height := 20;
Color := $ff0000;
end;
Add('Task%Progress').Shortcut := 'Percent';
end;
end;
with Items do
begin
h := AddItem('Task 1');
AddBar(h,'Percent','1/2/2001','1/14/2001','K1','text inside');
ItemBar[h,'K1',EXG2ANTTLib.ItemBarPropertyEnum.exBarVAlignCaption] := TObject(0);
ItemBar[h,'K1',EXG2ANTTLib.ItemBarPropertyEnum.exBarPercent] := TObject(0.75);
ItemBar[h,'K1',EXG2ANTTLib.ItemBarPropertyEnum.exBarShowPercentCaption] := TObject(True);
ItemBar[h,'K1',EXG2ANTTLib.ItemBarPropertyEnum.exBarPercentCaptionFormat] := '<br>%p%';
ItemBar[h,'K1',EXG2ANTTLib.ItemBarPropertyEnum.exBarAlignPercentCaption] := TObject(1);
ItemBar[h,'K1',EXG2ANTTLib.ItemBarPropertyEnum.exBarCanResizePercent] := TObject(False);
end;
EndUpdate();
end
|
1271
|
Is it possible to assign a multiple lines labels/captions to a bar

with AxG2antt1 do
begin
Columns.Add('Task');
Chart.FirstVisibleDate := '1/1/2001';
with Items do
begin
h := AddItem('Task 1');
ItemHeight[h] := 32;
AddBar(h,'Task','1/2/2001','1/6/2001','K1',Nil);
ItemBar[h,'K1',EXG2ANTTLib.ItemBarPropertyEnum.exBarCaption] := 'Line1<br>Line2';
end;
end
|
1270
|
Does your control supports multiple lines tooltip
with AxG2antt1 do
begin
set_HTMLPicture('pic1','c:\exontrol\images\zipdisk.gif');
ToolTipDelay := 1;
(Columns.Add('tootip') as EXG2ANTTLib.Column).ToolTip := '<font Tahoma;20>This</font> is a <b>multi-lines</b> tooltip assigned to a column. The tooltip supports built-in HTML tags, icons' +
' and pictures.<br><img>pic1</img> picture ...';
end
|
1269
|
It is possible to write the word in red/color or to add a tooltip or a link to the word

with AxG2antt1 do
begin
Columns.Add('Task');
with Chart do
begin
LevelCount := 2;
FirstVisibleDate := '12/26/2000';
PaneWidth[False] := 32;
end;
with Items do
begin
h1 := AddItem('Task 1');
AddBar(h1,'','1/1/2001','1/5/2001','K1','some <fgcolor=FF0000>red</fgcolor> text');
ItemBar[h1,'K1',EXG2ANTTLib.ItemBarPropertyEnum.exBarCanResize] := TObject(False);
ItemBar[h1,'K1',EXG2ANTTLib.ItemBarPropertyEnum.exBarToolTip] := 'And here goes the <b>tooltip</b> of the text. ';
AddItem('');
AddItem('');
AddItem('');
AddItem('');
h2 := AddItem('Task 2');
AddBar(h2,'Task','1/5/2001','1/7/2001','K2',Nil);
ItemBar[h2,'K2',EXG2ANTTLib.ItemBarPropertyEnum.exBarToolTip] := 'And here goes the <b>tooltip</b> of the bar. ';
AddLink('L1',h1,'K1',h2,'K2');
Link['L1',EXG2ANTTLib.LinkPropertyEnum.exLinkText] := 'L<b>inke</b>d to a bar';
Link['L1',EXG2ANTTLib.LinkPropertyEnum.exLinkToolTip] := 'And here goes the <b>tooltip</b> of the link. ';
end;
end
|
1268
|
It is possible to use seconds/minutes/hours as time scale in your control, but using my regional settings

with AxG2antt1 do
begin
BeginUpdate();
with Chart do
begin
Label[EXG2ANTTLib.UnitEnum.exMonth] := '<|><%loc_m1%><|><%loc_m2%><|><%loc_m3%><|><%loc_mmmm%><|><%loc_m3%> ''<%yy%><|><%loc_mmmm%> <%yyyy%>';
Label[EXG2ANTTLib.UnitEnum.exWeek] := '<|><%ww%><|><%loc_m3%> <%d%>, ''<%yy%><r><%ww%><|><%loc_mmmm%> <%d%>, <%yyyy%><r><%ww%><||><||>256';
Label[EXG2ANTTLib.UnitEnum.exDay] := '<|><%loc_d1%><|><%loc_d2%><|><%loc_d3%><|><%loc_dddd%><|><%loc_d3%>, <%loc_m3%> <%d%>, ''<%yy%><|><%loc_dddd%>, <%loc_mmmm%> <%d%' +
'>, <%yyyy%><||><||>4096';
Label[EXG2ANTTLib.UnitEnum.exHour] := '<|><%hh%><|><%h%> <%AM/PM%><|><%loc_d3%>, <%loc_m3%> <%d%>, ''<%yy%> <%h%> <%AM/PM%><|><%loc_dddd%>, <%loc_mmmm%> <%d%>, <%yyyy%>' +
' <%h%> <%AM/PM%><||><||>65536';
Label[EXG2ANTTLib.UnitEnum.exMinute] := '<|><%nn%><|><%h%>:<%nn%> <%AM/PM%><|><%loc_d3%>, <%loc_m3%> <%d%>, ''<%yy%> <%h%>:<%nn%> <%AM/PM%><|><%loc_dddd%>, <%loc_mmmm%> <' +
'%d%>, <%yyyy%> <%h%>:<%nn%> <%AM/PM%>';
Label[EXG2ANTTLib.UnitEnum.exSecond] := '<|><%ss%><|><%nn%>:<%ss%><|><%h%>:<%nn%>:<%ss%> <%AM/PM%><|><%loc_d3%>, <%loc_m3%> <%d%>, ''<%yy%> <%h%>:<%nn%>:<%ss%> <%AM/PM%><' +
'|><%loc_dddd%>, <%loc_mmmm%> <%d%>, <%yyyy%> <%h%>:<%nn%>:<%ss%> <%AM/PM%>';
LabelToolTip[EXG2ANTTLib.UnitEnum.exMonth] := '<%loc_mmmm%>/<%yyyy%>';
LabelToolTip[EXG2ANTTLib.UnitEnum.exWeek] := '<%loc_mmmm%> <%d%>, <%yyyy%> <%ww%>';
LabelToolTip[EXG2ANTTLib.UnitEnum.exDay] := '<%loc_dddd%>, <%loc_mmmm%> <%d%>, <%yyyy%>';
LabelToolTip[EXG2ANTTLib.UnitEnum.exHour] := '<%loc_dddd%>, <%loc_mmmm%> <%d%>, <%yyyy%> <%h%> <%AM/PM%>';
LabelToolTip[EXG2ANTTLib.UnitEnum.exMinute] := '<%loc_dddd%>, <%loc_mmmm%> <%d%>, <%yyyy%> <%h%>:<%nn%> <%AM/PM%>';
LabelToolTip[EXG2ANTTLib.UnitEnum.exSecond] := '<%loc_dddd%>, <%loc_mmmm%> <%d%>, <%yyyy%> <%h%>:<%nn%>:<%ss%> <%AM/PM%>';
end;
with Chart do
begin
PaneWidth[False] := 0;
FirstVisibleDate := '1/1/2001';
LevelCount := 4;
Level[0].Label := TObject(4096);
Level[1].Label := TObject(65536);
Level[2].Label := TObject(1048576);
with Level[3] do
begin
Count := 15;
Label := TObject(16777216);
end;
end;
EndUpdate();
end
|
1267
|
The chart's header is displayed in English. Can I change so it is the same as in my regional settings

with AxG2antt1 do
begin
BeginUpdate();
with Chart do
begin
Label[EXG2ANTTLib.UnitEnum.exMonth] := '<|><%loc_m1%><|><%loc_m2%><|><%loc_m3%><|><%loc_mmmm%><|><%loc_m3%> ''<%yy%><|><%loc_mmmm%> <%yyyy%>';
Label[EXG2ANTTLib.UnitEnum.exWeek] := '<|><%ww%><|><%loc_m3%> <%d%>, ''<%yy%><r><%ww%><|><%loc_mmmm%> <%d%>, <%yyyy%><r><%ww%><||><||>256';
Label[EXG2ANTTLib.UnitEnum.exDay] := '<|><%loc_d1%><|><%loc_d2%><|><%loc_d3%><|><%loc_dddd%><|><%loc_d3%>, <%loc_m3%> <%d%>, ''<%yy%><|><%loc_dddd%>, <%loc_mmmm%> <%d%' +
'>, <%yyyy%><||><||>4096';
Label[EXG2ANTTLib.UnitEnum.exHour] := '<|><%hh%><|><%h%> <%AM/PM%><|><%loc_d3%>, <%loc_m3%> <%d%>, ''<%yy%> <%h%> <%AM/PM%><|><%loc_dddd%>, <%loc_mmmm%> <%d%>, <%yyyy%>' +
' <%h%> <%AM/PM%><||><||>65536';
Label[EXG2ANTTLib.UnitEnum.exMinute] := '<|><%nn%><|><%h%>:<%nn%> <%AM/PM%><|><%loc_d3%>, <%loc_m3%> <%d%>, ''<%yy%> <%h%>:<%nn%> <%AM/PM%><|><%loc_dddd%>, <%loc_mmmm%> <' +
'%d%>, <%yyyy%> <%h%>:<%nn%> <%AM/PM%>';
Label[EXG2ANTTLib.UnitEnum.exSecond] := '<|><%ss%><|><%nn%>:<%ss%><|><%h%>:<%nn%>:<%ss%> <%AM/PM%><|><%loc_d3%>, <%loc_m3%> <%d%>, ''<%yy%> <%h%>:<%nn%>:<%ss%> <%AM/PM%><' +
'|><%loc_dddd%>, <%loc_mmmm%> <%d%>, <%yyyy%> <%h%>:<%nn%>:<%ss%> <%AM/PM%>';
LabelToolTip[EXG2ANTTLib.UnitEnum.exMonth] := '<%loc_mmmm%>/<%yyyy%>';
LabelToolTip[EXG2ANTTLib.UnitEnum.exWeek] := '<%loc_mmmm%> <%d%>, <%yyyy%> <%ww%>';
LabelToolTip[EXG2ANTTLib.UnitEnum.exDay] := '<%loc_dddd%>, <%loc_mmmm%> <%d%>, <%yyyy%>';
LabelToolTip[EXG2ANTTLib.UnitEnum.exHour] := '<%loc_dddd%>, <%loc_mmmm%> <%d%>, <%yyyy%> <%h%> <%AM/PM%>';
LabelToolTip[EXG2ANTTLib.UnitEnum.exMinute] := '<%loc_dddd%>, <%loc_mmmm%> <%d%>, <%yyyy%> <%h%>:<%nn%> <%AM/PM%>';
LabelToolTip[EXG2ANTTLib.UnitEnum.exSecond] := '<%loc_dddd%>, <%loc_mmmm%> <%d%>, <%yyyy%> <%h%>:<%nn%>:<%ss%> <%AM/PM%>';
end;
with Chart do
begin
PaneWidth[False] := 0;
FirstVisibleDate := '1/1/2001';
LevelCount := 2;
UnitScale := EXG2ANTTLib.UnitEnum.exDay;
end;
EndUpdate();
end
|
1266
|
It is possible to use seconds/minutes/hours as time scale in your control
with AxG2antt1 do
begin
BeginUpdate();
with Chart do
begin
PaneWidth[False] := 0;
FirstVisibleDate := '1/1/2001';
LevelCount := 4;
Level[0].Label := TObject(4096);
Level[1].Label := TObject(65536);
Level[2].Label := TObject(1048576);
with Level[3] do
begin
Count := 15;
Label := TObject(16777216);
end;
end;
EndUpdate();
end
|
1265
|
Is it possible to resize chart's column/level using the mouse as we can for the columns, but do not want to resize up to hours
with AxG2antt1 do
begin
BeginUpdate();
with Chart do
begin
PaneWidth[False] := 32;
LevelCount := 2;
FirstVisibleDate := '1/1/2008';
AllowInsideZoom := True;
AllowResizeInsideZoom := True;
InsideZoomOnDblClick := False;
with DefaultInsideZoomFormat do
begin
OwnerLabel := '<%d%>';
InsideLabel := '';
InsideUnit := EXG2ANTTLib.UnitEnum.exHour;
InsideCount := 24;
DrawTickLines := False;
DrawGridLines := False;
end;
with InsideZooms do
begin
SplitBaseLevel := False;
DefaultWidth := 18;
end;
end;
Columns.Add('Default');
with Items do
begin
AddBar(AddItem('Task'),'Task','1/3/2008','1/8/2008',Nil,Nil);
end;
EndUpdate();
end
|
1264
|
Is it possible to resize chart's column/level using the mouse as we can for the columns
with AxG2antt1 do
begin
BeginUpdate();
with Chart do
begin
PaneWidth[False] := 32;
LevelCount := 2;
FirstVisibleDate := '1/1/2008';
AllowInsideZoom := True;
AllowResizeInsideZoom := True;
InsideZoomOnDblClick := False;
with DefaultInsideZoomFormat do
begin
OwnerLabel := '<%d%>';
InsideLabel := '';
DrawTickLines := False;
DrawGridLines := False;
end;
with InsideZooms do
begin
SplitBaseLevel := False;
DefaultWidth := 18;
end;
end;
Columns.Add('Default');
with Items do
begin
AddBar(AddItem('Task'),'Task','1/3/2008','1/8/2008',Nil,Nil);
end;
EndUpdate();
end
|
1263
|
How can I empty or clear the undo/redo queue
with AxG2antt1 do
begin
BeginUpdate();
Columns.Add('Tasks');
with Chart do
begin
AllowUndoRedo := True;
FirstVisibleDate := '6/20/2005';
AllowLinkBars := True;
LevelCount := 2;
PaneWidth[False] := 48;
end;
with Items do
begin
AddBar(AddItem('Task 1'),'Task','6/21/2005','6/25/2005','',Nil);
AddBar(AddItem('Task 2'),'Task','6/28/2005','7/2/2005','',Nil);
OutputDebugString( AxG2antt1.Chart.UndoListAction[Nil,Nil] );
OutputDebugString( 'Clear undo/redo queue' );
AxG2antt1.Chart.AllowUndoRedo := False;
AxG2antt1.Chart.AllowUndoRedo := True;
OutputDebugString( AxG2antt1.Chart.UndoListAction[Nil,Nil] );
end;
EndUpdate();
end
|
1262
|
How can I remove the undo/redo queue
with AxG2antt1 do
begin
BeginUpdate();
Columns.Add('Tasks');
with Chart do
begin
AllowUndoRedo := True;
FirstVisibleDate := '6/20/2005';
AllowLinkBars := True;
LevelCount := 2;
PaneWidth[False] := 48;
end;
with Items do
begin
AddBar(AddItem('Task 1'),'Task','6/21/2005','6/25/2005','',Nil);
AddBar(AddItem('Task 2'),'Task','6/28/2005','7/2/2005','',Nil);
OutputDebugString( AxG2antt1.Chart.UndoListAction[Nil,Nil] );
OutputDebugString( 'Clear undo/redo queue' );
AxG2antt1.Chart.UndoRemoveAction(Nil,Nil);
AxG2antt1.Chart.RedoRemoveAction(Nil,Nil);
OutputDebugString( AxG2antt1.Chart.UndoListAction[Nil,Nil] );
end;
EndUpdate();
end
|
1261
|
Is it possible to prevent adding an undo operation for instance the RemoveLink(LinkKey) I call during the AddLink event
// AddLink event - Occurs when the user links two bars using the mouse.
procedure TWinForm1.AxG2antt1_AddLink(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_AddLinkEvent);
begin
with AxG2antt1 do
begin
Items.RemoveLink(TObject(e.linkKey));
Chart.UndoRemoveAction(TObject(10),TObject(1));
Chart.UndoRemoveAction(TObject(11),TObject(1));
OutputDebugString( Chart.UndoListAction[Nil,Nil] );
end
end;
// ChartEndChanging event - Occurs after the chart has been changed.
procedure TWinForm1.AxG2antt1_ChartEndChanging(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_ChartEndChangingEvent);
begin
with AxG2antt1 do
begin
OutputDebugString( Chart.UndoListAction[Nil,Nil] );
end
end;
with AxG2antt1 do
begin
BeginUpdate();
Columns.Add('Tasks');
with Chart do
begin
AllowUndoRedo := True;
FirstVisibleDate := '6/20/2005';
AllowLinkBars := True;
LevelCount := 2;
PaneWidth[False] := 48;
end;
with Items do
begin
AddBar(AddItem('Task 1'),'Task','6/21/2005','6/25/2005','',Nil);
AddBar(AddItem('Task 2'),'Task','6/28/2005','7/2/2005','',Nil);
end;
EndUpdate();
end
|
1260
|
Is it possible to rename the links from "Link1" to my choice
// AddLink event - Occurs when the user links two bars using the mouse.
procedure TWinForm1.AxG2antt1_AddLink(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_AddLinkEvent);
begin
with AxG2antt1 do
begin
Items.Link[TObject(e.linkKey),EXG2ANTTLib.LinkPropertyEnum.exLinkKey] := 'newIDlink';
end
end;
// MouseMove event - Occurs when the user moves the mouse.
procedure TWinForm1.AxG2antt1_MouseMoveEvent(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_MouseMoveEvent);
begin
with AxG2antt1 do
begin
OutputDebugString( Chart.LinkFromPoint[-1,-1] );
end
end;
with AxG2antt1 do
begin
BeginUpdate();
Columns.Add('Tasks');
with Chart do
begin
FirstVisibleDate := '6/20/2005';
AllowLinkBars := True;
LevelCount := 2;
PaneWidth[False] := 48;
end;
with Items do
begin
AddBar(AddItem('Task 1'),'Task','6/21/2005','6/25/2005','',Nil);
AddBar(AddItem('Task 2'),'Task','6/28/2005','7/2/2005','',Nil);
end;
EndUpdate();
end
|
1259
|
How can I prevent highlighting the column from the cursor - point

with AxG2antt1 do
begin
VisualAppearance.Add(1,'gBFLBCJwBAEHhEJAEGg4BI0IQAAYAQGKIYBkAKBQAGaAoDDUOQzQwAAxDKKUEwsACEIrjKCYVgOHYYRrIMYgBCMJhLEoaZLhEZRQiqDYtRDFQBSDDcPw/EaRZohGaYJg' +
'EgI=');
set_Background(EXG2ANTTLib.BackgroundPartEnum.exCursorHoverColumn,$1000000);
(Columns.Add('S') as EXG2ANTTLib.Column).Width := 32;
(Columns.Add('Level 1') as EXG2ANTTLib.Column).LevelKey := TObject(1);
(Columns.Add('Level 2') as EXG2ANTTLib.Column).LevelKey := TObject(1);
(Columns.Add('Level 3') as EXG2ANTTLib.Column).LevelKey := TObject(1);
(Columns.Add('E1') as EXG2ANTTLib.Column).Width := 32;
(Columns.Add('E2') as EXG2ANTTLib.Column).Width := 32;
(Columns.Add('E3') as EXG2ANTTLib.Column).Width := 32;
(Columns.Add('E4') as EXG2ANTTLib.Column).Width := 32;
end
|
1258
|
Is it possible to specify the background color for the item in the chart part only
with AxG2antt1 do
begin
Columns.Add('Default');
with Items do
begin
h := AddItem('Root');
hC := InsertItem(h,Nil,'Child 1');
AxG2antt1.Chart.ItemBackColor[hC] := $ff;
InsertItem(h,Nil,'Child 2');
ExpandItem[h] := True;
end;
end
|
1257
|
Is it possible to apply different visual appearance, color, sizes for item in the list and chart part

with AxG2antt1 do
begin
VisualAppearance.Add(1,'c:\exontrol\images\normal.ebn');
VisualAppearance.Add(2,'c:\exontrol\images\pushed.ebn');
VisualAppearance.Add(3,'CP:2 2 2 -2 -2');
Columns.Add('Default');
SelBackMode := EXG2ANTTLib.BackModeEnum.exTransparent;
with Items do
begin
h := AddItem('Root');
hC := InsertItem(h,Nil,'Child 1');
ItemBackColor[hC] := $1ffff00;
AxG2antt1.Chart.ItemBackColor[hC] := $300ff00;
InsertItem(h,Nil,'Child 2');
ExpandItem[h] := True;
end;
end
|
1256
|
How do I change the visual appearance for the entire item, using your EBN technology

with AxG2antt1 do
begin
VisualAppearance.Add(1,'c:\exontrol\images\normal.ebn');
Columns.Add('Default');
with Items do
begin
h := AddItem('Root');
hC := InsertItem(h,Nil,'Child 1');
ItemBackColor[hC] := $1000000;
AxG2antt1.Chart.ItemBackColor[hC] := $1000000;
InsertItem(h,Nil,'Child 2');
ExpandItem[h] := True;
end;
end
|
1255
|
is it possible to specify the a different background color for the item, list and chart part

with AxG2antt1 do
begin
Columns.Add('Default');
with Items do
begin
h := AddItem('Root');
hC := InsertItem(h,Nil,'Child 1');
ItemBackColor[hC] := $ff;
AxG2antt1.Chart.ItemBackColor[hC] := $ffff;
InsertItem(h,Nil,'Child 2');
ExpandItem[h] := True;
end;
end
|
1254
|
Is it possible to specify the background color for the entire row, including the chart part

with AxG2antt1 do
begin
Columns.Add('Default');
with Items do
begin
h := AddItem('Root');
hC := InsertItem(h,Nil,'Child 1');
ItemBackColor[hC] := $ff;
AxG2antt1.Chart.ItemBackColor[hC] := $ff;
InsertItem(h,Nil,'Child 2');
ExpandItem[h] := True;
end;
end
|
1253
|
Is it possible to prevent overlaying the bars while moving or resizing the bars, so they get arranged once the bar is moved or resized
with AxG2antt1 do
begin
BeginUpdate();
ScrollBySingleLine := True;
Columns.Add('Task');
DrawGridLines := EXG2ANTTLib.GridLinesEnum.exHLines;
with Chart do
begin
OverlaidOnMoving := False;
DrawGridLines := EXG2ANTTLib.GridLinesEnum.exHLines;
AllowCreateBar := EXG2ANTTLib.CreateBarEnum.exCreateBarAuto;
AllowLinkBars := False;
ResizeUnitScale := EXG2ANTTLib.UnitEnum.exHour;
PaneWidth[False] := 48;
FirstVisibleDate := '1/1/2001';
Bars.Item['Task'].OverlaidType := Integer(EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStackAutoArrange) Or Integer(EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStack);
end;
with Items do
begin
AddItem('');
h := AddItem('Task');
AddBar(h,'Task','1/7/2001','1/10/2001','A1',Nil);
AddBar(h,'Task','1/8/2001','1/12/2001','A3',Nil);
end;
EndUpdate();
end
|
1252
|
Is it possible display numbers in the same format no matter of regional settings in the control panel
with AxG2antt1 do
begin
BeginUpdate();
Chart.PaneWidth[True] := 0;
(Columns.Add('Def') as EXG2ANTTLib.Column).Def[EXG2ANTTLib.DefColumnEnum.exCellValueFormat] := TObject(1);
with Items do
begin
h := AddItem(TObject(100000.27));
FormatCell[TObject(h),TObject(0)] := '(value format '''') + '' <fgcolor=808080>(default positive)''';
h := AddItem(TObject(100000.27));
FormatCell[TObject(h),TObject(0)] := '(value format ''2|.|3|,|1|1'')';
h := AddItem(TObject(-100000.27));
FormatCell[TObject(h),TObject(0)] := '(value format '''') + '' <fgcolor=808080>(default negative)''';
h := AddItem(TObject(-100000.27));
FormatCell[TObject(h),TObject(0)] := '(value format ''2|.|3|,|1|1'')';
end;
EndUpdate();
end
|
1251
|
Is it possible to add a 0 for numbers less than 1 instead .7 to show 0.8
with AxG2antt1 do
begin
BeginUpdate();
Chart.PaneWidth[True] := 0;
(Columns.Add('Def') as EXG2ANTTLib.Column).Def[EXG2ANTTLib.DefColumnEnum.exCellValueFormat] := TObject(1);
with Items do
begin
h := AddItem(TObject(0.27));
FormatCell[TObject(h),TObject(0)] := '(value format '''') + '' <fgcolor=808080>(default)''';
h := AddItem(TObject(0.27));
FormatCell[TObject(h),TObject(0)] := '(value format ''|||||0'') + '' <fgcolor=808080>(Display no leading zeros)''';
end;
EndUpdate();
end
|
1250
|
How can I specify the format for negative numbers
with AxG2antt1 do
begin
BeginUpdate();
Chart.PaneWidth[True] := 0;
(Columns.Add('Def') as EXG2ANTTLib.Column).Def[EXG2ANTTLib.DefColumnEnum.exCellValueFormat] := TObject(1);
with Items do
begin
h := AddItem(TObject(-100000.27));
FormatCell[TObject(h),TObject(0)] := '(value format '''') + '' <fgcolor=808080>(default)''';
h := AddItem(TObject(-100000.27));
FormatCell[TObject(h),TObject(0)] := '(value format ''||||1'') + '' <fgcolor=808080>(Negative sign, number; for example, -1.1)''';
end;
EndUpdate();
end
|
1249
|
Is it possible to change the grouping character when display numbers
with AxG2antt1 do
begin
BeginUpdate();
Chart.PaneWidth[True] := 0;
(Columns.Add('Def') as EXG2ANTTLib.Column).Def[EXG2ANTTLib.DefColumnEnum.exCellValueFormat] := TObject(1);
with Items do
begin
h := AddItem(TObject(100000.27));
FormatCell[TObject(h),TObject(0)] := '(value format '''') + '' <fgcolor=808080>(default)''';
h := AddItem(TObject(100000.27));
FormatCell[TObject(h),TObject(0)] := '(value format ''|||-'') + '' <fgcolor=808080>(grouping character is -)''';
end;
EndUpdate();
end
|
1248
|
How can I display numbers with 2 digits in each group
with AxG2antt1 do
begin
BeginUpdate();
Chart.PaneWidth[True] := 0;
(Columns.Add('Def') as EXG2ANTTLib.Column).Def[EXG2ANTTLib.DefColumnEnum.exCellValueFormat] := TObject(1);
with Items do
begin
h := AddItem(TObject(100000.27));
FormatCell[TObject(h),TObject(0)] := '(value format '''') + '' <fgcolor=808080>(default)''';
h := AddItem(TObject(100000.27));
FormatCell[TObject(h),TObject(0)] := '(value format ''||2'') + '' <fgcolor=808080>(grouping by 2 digits)''';
end;
EndUpdate();
end
|
1247
|
How can I display my numbers using a different decimal separator
with AxG2antt1 do
begin
BeginUpdate();
Chart.PaneWidth[True] := 0;
(Columns.Add('Def') as EXG2ANTTLib.Column).Def[EXG2ANTTLib.DefColumnEnum.exCellValueFormat] := TObject(1);
with Items do
begin
h := AddItem(TObject(100.27));
FormatCell[TObject(h),TObject(0)] := '(value format '''') + '' <fgcolor=808080>(default)''';
h := AddItem(TObject(100.27));
FormatCell[TObject(h),TObject(0)] := '(value format ''|;'') + '' <fgcolor=808080>(decimal separator is <b>;</b>)''';
end;
EndUpdate();
end
|
1246
|
Is it possible to display the numbers using 3 (three) digits
with AxG2antt1 do
begin
BeginUpdate();
Chart.PaneWidth[True] := 0;
(Columns.Add('Def') as EXG2ANTTLib.Column).Def[EXG2ANTTLib.DefColumnEnum.exCellValueFormat] := TObject(1);
with Items do
begin
h := AddItem(TObject(100.27));
FormatCell[TObject(h),TObject(0)] := '(value format '''') + '' <fgcolor=808080>(default)''';
h := AddItem(TObject(100.27));
FormatCell[TObject(h),TObject(0)] := '(value format ''3'') + '' <fgcolor=808080>(3 digits)''';
h := AddItem(TObject(100.27));
FormatCell[TObject(h),TObject(0)] := '(value format 2) + '' <fgcolor=808080>(2 digits)''';
h := AddItem(TObject(100.27));
FormatCell[TObject(h),TObject(0)] := '(value format 1) + '' <fgcolor=808080>(1 digit)''';
end;
EndUpdate();
end
|
1245
|
Is it possible to format numbers

with AxG2antt1 do
begin
BeginUpdate();
MarkSearchColumn := False;
SelBackColor := BackColor;
SelForeColor := ForeColor;
ShowFocusRect := True;
Chart.PaneWidth[True] := 0;
with Columns do
begin
Add('Name');
with (Add('A') as EXG2ANTTLib.Column) do
begin
SortType := EXG2ANTTLib.SortTypeEnum.SortNumeric;
AllowSizing := False;
Width := 36;
FormatColumn := 'len(value) ? value + '' +''';
Editor.EditType := EXG2ANTTLib.EditTypeEnum.SpinType;
end;
with (Add('B') as EXG2ANTTLib.Column) do
begin
SortType := EXG2ANTTLib.SortTypeEnum.SortNumeric;
AllowSizing := False;
Width := 36;
FormatColumn := 'len(value) ? value + '' +''';
Editor.EditType := EXG2ANTTLib.EditTypeEnum.SpinType;
end;
with (Add('C') as EXG2ANTTLib.Column) do
begin
SortType := EXG2ANTTLib.SortTypeEnum.SortNumeric;
AllowSizing := False;
Width := 36;
FormatColumn := 'len(value) ? value + '' =''';
Editor.EditType := EXG2ANTTLib.EditTypeEnum.SpinType;
end;
with (Add('A+B+C') as EXG2ANTTLib.Column) do
begin
SortType := EXG2ANTTLib.SortTypeEnum.SortNumeric;
Width := 64;
ComputedField := 'dbl(%1)+dbl(%2)+dbl(%3)';
FormatColumn := 'type(value) in (0,1) ? ''null'' : ( dbl(value)<0 ? ''<fgcolor=FF0000>''+ (value format ''2|.|3|,|1'' ) : (dbl(value)>0 ? ''<fgcolor=000' +
'0FF>+''+(value format ''2|.|3|,'' ): ''0.00'') )';
Def[EXG2ANTTLib.DefColumnEnum.exCellValueFormat] := TObject(1);
end;
end;
with Items do
begin
h := AddItem('Root');
CellValueFormat[TObject(h),TObject(4)] := EXG2ANTTLib.ValueFormatEnum.exComputedField;
h1 := InsertItem(h,Nil,'Child 1');
CellValue[TObject(h1),TObject(1)] := TObject(7);
CellValue[TObject(h1),TObject(2)] := TObject(3);
CellValue[TObject(h1),TObject(3)] := TObject(1);
h1 := InsertItem(h,Nil,'Child 2');
CellValue[TObject(h1),TObject(1)] := TObject(-2);
CellValue[TObject(h1),TObject(2)] := TObject(-2);
CellValue[TObject(h1),TObject(3)] := TObject(-4);
h1 := InsertItem(h,Nil,'Child 3');
CellValue[TObject(h1),TObject(1)] := TObject(2);
CellValue[TObject(h1),TObject(2)] := TObject(2);
CellValue[TObject(h1),TObject(3)] := TObject(-4);
ExpandItem[h] := True;
end;
EndUpdate();
end
|
1244
|
How can I show the tooltip programmatically ( I want to be able to set the tooltip content dynamically just before the tooltip start to appear, not using the exBarTooltip )
// MouseMove event - Occurs when the user moves the mouse.
procedure TWinForm1.AxG2antt1_MouseMoveEvent(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_MouseMoveEvent);
begin
with AxG2antt1 do
begin
ShowToolTip(Chart.BarFromPoint[-1,-1],'',TObject(2),'4','-4');
end
end;
with AxG2antt1 do
begin
BeginUpdate();
Columns.Add('Def');
with Chart do
begin
AllowCreateBar := EXG2ANTTLib.CreateBarEnum.exNoCreateBar;
PaneWidth[False] := 64;
LevelCount := 2;
FirstVisibleDate := '1/1/2010';
end;
with Items do
begin
h := AddItem('Task');
AddBar(h,'Task','1/2/2010','1/5/2010','A','A');
AddBar(h,'Task','1/5/2010','1/8/2010','B','B');
AddBar(h,'Task','1/8/2010','1/11/2010','C','C');
GroupBars(h,'A',False,h,'B',True,TObject(39),Nil);
GroupBars(h,'B',False,h,'C',True,TObject(39),Nil);
end;
EndUpdate();
end
|
1243
|
How can I set the column's width to my desired width
with AxG2antt1 do
begin
ColumnAutoResize := False;
with Columns do
begin
(Add('A') as EXG2ANTTLib.Column).Width := 128;
(Add('B') as EXG2ANTTLib.Column).Width := 128;
end;
DrawGridLines := EXG2ANTTLib.GridLinesEnum.exAllLines;
end
|
1242
|
Is it possible to prevent intersection of three bars or more

with AxG2antt1 do
begin
BeginUpdate();
Columns.Add('Def');
with Chart do
begin
AllowCreateBar := EXG2ANTTLib.CreateBarEnum.exNoCreateBar;
PaneWidth[False] := 64;
LevelCount := 2;
FirstVisibleDate := '1/1/2010';
end;
with Items do
begin
h := AddItem('Task');
AddBar(h,'Task','1/2/2010','1/5/2010','A','A');
AddBar(h,'Task','1/5/2010','1/8/2010','B','B');
AddBar(h,'Task','1/8/2010','1/11/2010','C','C');
GroupBars(h,'A',False,h,'B',True,TObject(39),Nil);
GroupBars(h,'B',False,h,'C',True,TObject(39),Nil);
end;
EndUpdate();
end
|
1241
|
Is it possible to prevent intersection of two bars

with AxG2antt1 do
begin
BeginUpdate();
Columns.Add('Def');
with Chart do
begin
AllowCreateBar := EXG2ANTTLib.CreateBarEnum.exNoCreateBar;
PaneWidth[False] := 64;
LevelCount := 2;
FirstVisibleDate := '1/1/2010';
end;
with Items do
begin
h := AddItem('Task');
AddBar(h,'Task','1/2/2010','1/5/2010','A','A');
AddBar(h,'Task','1/5/2010','1/8/2010','B','B');
GroupBars(h,'A',False,h,'B',True,TObject(39),Nil);
end;
EndUpdate();
end
|
1240
|
Is it possible to specify the cell's value but still want to display some formatted text instead the value
with AxG2antt1 do
begin
BeginUpdate();
Chart.PaneWidth[True] := 0;
Columns.Add('Value');
Columns.Add('FormatCell');
with Items do
begin
h := AddItem(TObject(1));
CellValue[TObject(h),TObject(1)] := TObject(12);
FormatCell[TObject(h),TObject(1)] := 'currency(value)';
h := AddItem('1/1/2001');
CellValue[TObject(h),TObject(1)] := '1/1/2001';
CellValueFormat[TObject(h),TObject(1)] := EXG2ANTTLib.ValueFormatEnum.exHTML;
FormatCell[TObject(h),TObject(1)] := 'longdate(value) replace ''2001'' with ''<b>2001</b>''';
end;
EndUpdate();
end
|
1239
|
How can I simulate displaying groups

with AxG2antt1 do
begin
HasLines := EXG2ANTTLib.HierarchyLineEnum.exNoLine;
ScrollBySingleLine := True;
Chart.PaneWidth[True] := 0;
with Columns do
begin
Add('Name');
Add('A');
Add('B');
Add('C');
end;
with Items do
begin
h := AddItem('Group 1');
CellHAlignment[TObject(h),TObject(0)] := EXG2ANTTLib.AlignmentEnum.CenterAlignment;
ItemDivider[h] := 0;
ItemDividerLineAlignment[h] := EXG2ANTTLib.DividerAlignmentEnum.DividerBoth;
ItemHeight[h] := 24;
SortableItem[h] := False;
h1 := InsertItem(h,Nil,'Child 1');
CellValue[TObject(h1),TObject(1)] := TObject(1);
CellValue[TObject(h1),TObject(2)] := TObject(2);
CellValue[TObject(h1),TObject(3)] := TObject(3);
h1 := InsertItem(h,Nil,'Child 2');
CellValue[TObject(h1),TObject(1)] := TObject(4);
CellValue[TObject(h1),TObject(2)] := TObject(5);
CellValue[TObject(h1),TObject(3)] := TObject(6);
ExpandItem[h] := True;
h := AddItem('Group 2');
CellHAlignment[TObject(h),TObject(0)] := EXG2ANTTLib.AlignmentEnum.CenterAlignment;
ItemDivider[h] := 0;
ItemDividerLineAlignment[h] := EXG2ANTTLib.DividerAlignmentEnum.DividerBoth;
ItemHeight[h] := 24;
SortableItem[h] := False;
h1 := InsertItem(h,Nil,'Child 1');
CellValue[TObject(h1),TObject(1)] := TObject(1);
CellValue[TObject(h1),TObject(2)] := TObject(2);
CellValue[TObject(h1),TObject(3)] := TObject(3);
h1 := InsertItem(h,Nil,'Child 2');
CellValue[TObject(h1),TObject(1)] := TObject(4);
CellValue[TObject(h1),TObject(2)] := TObject(5);
CellValue[TObject(h1),TObject(3)] := TObject(6);
ExpandItem[h] := True;
end;
end
|
1238
|
Is it possible to specify the cell's value but still want to display some formatted text instead the value

with AxG2antt1 do
begin
BeginUpdate();
Chart.PaneWidth[True] := 0;
MarkSearchColumn := False;
with Columns do
begin
Add('Name');
with (Add('Values') as EXG2ANTTLib.Column) do
begin
SortType := EXG2ANTTLib.SortTypeEnum.SortNumeric;
AllowSizing := False;
Width := 64;
FormatColumn := '((0:=dbl(value)) < 10? ''<fgcolor=808080><font ;7>'' :''<b>'') + currency(=:0)';
Def[EXG2ANTTLib.DefColumnEnum.exCellValueFormat] := TObject(1);
end;
end;
with Items do
begin
h := AddItem('Root');
FormatCell[TObject(h),TObject(1)] := '''<none>''';
CellValue[TObject(InsertItem(h,Nil,'Child 1')),TObject(1)] := TObject(10);
CellValue[TObject(InsertItem(h,Nil,'Child 2')),TObject(1)] := TObject(15);
CellValue[TObject(InsertItem(h,Nil,'Child 3')),TObject(1)] := TObject(25);
ExpandItem[h] := True;
end;
EndUpdate();
end
|
1237
|
I am using the FormatColumn to display the current currency, but would like hide some values. Is it possible

with AxG2antt1 do
begin
BeginUpdate();
Chart.PaneWidth[True] := 0;
MarkSearchColumn := False;
with Columns do
begin
Add('Name');
with (Add('Values') as EXG2ANTTLib.Column) do
begin
SortType := EXG2ANTTLib.SortTypeEnum.SortNumeric;
AllowSizing := False;
Width := 64;
FormatColumn := '((0:=dbl(value)) < 10? ''<fgcolor=808080><font ;7>'' :''<b>'') + currency(=:0)';
Def[EXG2ANTTLib.DefColumnEnum.exCellValueFormat] := TObject(1);
end;
end;
with Items do
begin
h := AddItem('Root');
FormatCell[TObject(h),TObject(1)] := ' ';
CellValue[TObject(InsertItem(h,Nil,'Child 1')),TObject(1)] := TObject(10);
CellValue[TObject(InsertItem(h,Nil,'Child 2')),TObject(1)] := TObject(15);
CellValue[TObject(InsertItem(h,Nil,'Child 3')),TObject(1)] := TObject(25);
ExpandItem[h] := True;
end;
EndUpdate();
end
|
1236
|
I have a right-aligned column with check-boxes with no text, but it is not perfectly aligned. Is there something I can do
with AxG2antt1 do
begin
BeginUpdate();
TreeColumnIndex := -1;
DrawGridLines := EXG2ANTTLib.GridLinesEnum.exAllLines;
ShowFocusRect := False;
with Columns do
begin
with (Add('Default-Right') as EXG2ANTTLib.Column) do
begin
Def[EXG2ANTTLib.DefColumnEnum.exCellHasCheckBox] := TObject(True);
Alignment := EXG2ANTTLib.AlignmentEnum.RightAlignment;
HeaderAlignment := EXG2ANTTLib.AlignmentEnum.RightAlignment;
end;
with (Add('Custom-Right') as EXG2ANTTLib.Column) do
begin
Def[EXG2ANTTLib.DefColumnEnum.exCellHasCheckBox] := TObject(True);
Def[EXG2ANTTLib.DefColumnEnum.exCellDrawPartsOrder] := 'icon,icons,picture,caption,check';
HeaderAlignment := EXG2ANTTLib.AlignmentEnum.RightAlignment;
Alignment := EXG2ANTTLib.AlignmentEnum.RightAlignment;
end;
end;
with Items do
begin
AddItem(Nil);
AddItem(Nil);
AddItem(Nil);
end;
EndUpdate();
end
|
1235
|
How can I specify that once I move or resize a bar other should be automatically moved/resized
with AxG2antt1 do
begin
BeginUpdate();
MarkSearchColumn := False;
Columns.Add('Tasks');
(Columns.Add('Start') as EXG2ANTTLib.Column).Visible := False;
(Columns.Add('End') as EXG2ANTTLib.Column).Visible := False;
with Chart do
begin
FirstVisibleDate := '9/20/2006';
PaneWidth[False] := 64;
end;
with Items do
begin
h1 := AddItem('Item 1');
CellValue[TObject(h1),TObject(1)] := '9/21/2006';
CellValue[TObject(h1),TObject(2)] := '9/24/2006';
AddBar(h1,'Task',CellValue[TObject(h1),TObject(1)],CellValue[TObject(h1),TObject(2)],'',Nil);
h2 := AddItem('Item 2');
CellValue[TObject(h2),TObject(1)] := '9/21/2006';
CellValue[TObject(h2),TObject(2)] := '9/24/2006';
AddBar(h2,'Task',CellValue[TObject(h2),TObject(1)],CellValue[TObject(h2),TObject(2)],'',Nil);
GroupBars(h1,'',True,h2,'',True,Nil,Nil);
GroupBars(h1,'',False,h2,'',False,Nil,Nil);
end;
EndUpdate();
end
|
1234
|
How can I specify that once I move a bar other should be automatically moved
with AxG2antt1 do
begin
BeginUpdate();
MarkSearchColumn := False;
Columns.Add('Tasks');
(Columns.Add('Start') as EXG2ANTTLib.Column).Visible := False;
(Columns.Add('End') as EXG2ANTTLib.Column).Visible := False;
with Chart do
begin
FirstVisibleDate := '9/20/2006';
PaneWidth[False] := 64;
end;
with Items do
begin
h1 := AddItem('Item 1');
CellValue[TObject(h1),TObject(1)] := '9/21/2006';
CellValue[TObject(h1),TObject(2)] := '9/24/2006';
AddBar(h1,'Task',CellValue[TObject(h1),TObject(1)],CellValue[TObject(h1),TObject(2)],'',Nil);
h2 := AddItem('Item 2');
CellValue[TObject(h2),TObject(1)] := '9/21/2006';
CellValue[TObject(h2),TObject(2)] := '9/24/2006';
AddBar(h2,'Task',CellValue[TObject(h2),TObject(1)],CellValue[TObject(h2),TObject(2)],'',Nil);
GroupBars(h1,'',True,h2,'',True,TObject(3),Nil);
end;
EndUpdate();
end
|
1233
|
Is it possible to include the bar's caption in overlaying

with AxG2antt1 do
begin
BeginUpdate();
ScrollBySingleLine := True;
Columns.Add('Task');
DrawGridLines := EXG2ANTTLib.GridLinesEnum.exHLines;
with Chart do
begin
DrawGridLines := EXG2ANTTLib.GridLinesEnum.exHLines;
AllowCreateBar := EXG2ANTTLib.CreateBarEnum.exCreateBarAuto;
AllowLinkBars := False;
ResizeUnitScale := EXG2ANTTLib.UnitEnum.exHour;
PaneWidth[False] := 48;
FirstVisibleDate := '1/1/2001';
with Bars.Item['Task'] do
begin
OverlaidType := Integer(EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsIncludeCaption) Or Integer(EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStackAutoArrange) Or Integer(EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStack);
OverlaidGroup := 'Milestone';
end;
end;
with Items do
begin
h := AddItem('Task 1');
AddBar(h,'Task','1/2/2001','1/4/2001','A1','task');
ItemBar[h,'A1',EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption] := TObject(18);
AddBar(h,'Milestone','1/3/2001','1/3/2001','M','milestone');
ItemBar[h,'M',EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption] := TObject(18);
h := AddItem('Task 2');
AddBar(h,'Task','1/8/2001','1/12/2001','A1','task');
ItemBar[h,'A1',EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption] := TObject(18);
AddBar(h,'Milestone','1/8/2001','1/8/2001','M','milestone');
ItemBar[h,'M',EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption] := TObject(18);
end;
EndUpdate();
end
|
1232
|
Sometimes, the milestone bars are not overlaying the task bars. What I am doing wrong
with AxG2antt1 do
begin
BeginUpdate();
ScrollBySingleLine := True;
Columns.Add('Task');
DrawGridLines := EXG2ANTTLib.GridLinesEnum.exHLines;
with Chart do
begin
DrawGridLines := EXG2ANTTLib.GridLinesEnum.exHLines;
AllowCreateBar := EXG2ANTTLib.CreateBarEnum.exCreateBarAuto;
AllowLinkBars := False;
ResizeUnitScale := EXG2ANTTLib.UnitEnum.exHour;
PaneWidth[False] := 48;
FirstVisibleDate := '1/1/2001';
with Bars.Item['Task'] do
begin
OverlaidType := Integer(EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsIncludeCaption) Or Integer(EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStackAutoArrange) Or Integer(EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStack);
OverlaidGroup := 'Milestone';
end;
end;
with Items do
begin
h := AddItem('Task 1');
AddBar(h,'Task','1/2/2001','1/4/2001','A1',Nil);
AddBar(h,'Milestone','1/3/2001','1/3/2001','M',Nil);
h := AddItem('Task 2');
AddBar(h,'Task','1/7/2001','1/10/2001','A1',Nil);
AddBar(h,'Milestone','1/8/2001','1/8/2001','M',Nil);
end;
EndUpdate();
end
|
1231
|
Is it possible to add milestone bars in the same overlaid group as task is

with AxG2antt1 do
begin
BeginUpdate();
ScrollBySingleLine := True;
Columns.Add('Task');
DrawGridLines := EXG2ANTTLib.GridLinesEnum.exHLines;
with Chart do
begin
DrawGridLines := EXG2ANTTLib.GridLinesEnum.exHLines;
AllowCreateBar := EXG2ANTTLib.CreateBarEnum.exCreateBarAuto;
AllowLinkBars := False;
ResizeUnitScale := EXG2ANTTLib.UnitEnum.exHour;
PaneWidth[False] := 48;
FirstVisibleDate := '1/1/2001';
with Bars.Item['Task'] do
begin
OverlaidType := Integer(EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStackAutoArrange) Or Integer(EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStack);
OverlaidGroup := 'Milestone';
end;
end;
with Items do
begin
h := AddItem('Task 1');
AddBar(h,'Task','1/2/2001','1/4/2001','A1',Nil);
AddBar(h,'Milestone','1/3/2001','1/3/2001','M',Nil);
h := AddItem('Task 2');
AddBar(h,'Task','1/7/2001','1/10/2001','A1',Nil);
AddBar(h,'Milestone','1/8/2001','1/8/2001','M',Nil);
end;
EndUpdate();
end
|
1230
|
When adding a date column and setting the SortType to SortTypeEnum.SortDateTime, the column still sorts as a string. What am I doing wrong
with AxG2antt1 do
begin
BeginUpdate();
(Columns.Add('Date') as EXG2ANTTLib.Column).SortType := EXG2ANTTLib.SortTypeEnum.SortDateTime;
Columns.Add('String');
with Items do
begin
h := AddItem('1/1/2001');
CellValue[TObject(h),TObject(1)] := CellValue[TObject(h),TObject(0)];
h := AddItem('1/11/2001');
CellValue[TObject(h),TObject(1)] := CellValue[TObject(h),TObject(0)];
h := AddItem('1/2/2001');
CellValue[TObject(h),TObject(1)] := CellValue[TObject(h),TObject(0)];
end;
Columns.Item[TObject(0)].SortOrder := EXG2ANTTLib.SortOrderEnum.SortDescending;
EndUpdate();
end
|
1229
|
Is it possible to move an item from a parent to another
with AxG2antt1 do
begin
BeginUpdate();
LinesAtRoot := EXG2ANTTLib.LinesAtRootEnum.exLinesAtRoot;
Columns.Add('Items');
with Items do
begin
AddItem('A');
AddItem('B');
InsertItem(AddItem('C'),'','D');
SetParent(FindItem['D',TObject(0),Nil],FindItem['A',TObject(0),Nil]);
end;
EndUpdate();
end
|
1228
|
How can I change the identation for an item
with AxG2antt1 do
begin
BeginUpdate();
LinesAtRoot := EXG2ANTTLib.LinesAtRootEnum.exLinesAtRoot;
Columns.Add('Items');
with Items do
begin
AddItem('A');
AddItem('B');
InsertItem(AddItem('C'),'','D');
SetParent(FindItem['D',TObject(0),Nil],0);
end;
EndUpdate();
end
|
1227
|
Moving the bars fail if I am using GroupBars, exBarCanResize on 0 and exBarKeepWorkingCount on True ( bars keeps the working units and at runtime user can not resize them ). Is it possible to use the GroupBars while user should not be able to resize the bars at runtime

with AxG2antt1 do
begin
BeginUpdate();
Columns.Add('Tasks');
with Chart do
begin
FirstVisibleDate := '9/20/2006';
PaneWidth[False] := 48;
LevelCount := 2;
Bars.Add('Task:Split').Shortcut := 'Task';
end;
with Items do
begin
h1 := AddItem('Task 1');
AddBar(h1,'Task','9/26/2006','9/29/2006','','A');
ItemBar[h1,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarKeepWorkingCount] := TObject(True);
ItemBar[h1,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarCanResize] := TObject(4);
AddItem('');
AddItem('');
AddItem('');
h2 := AddItem('Task 2');
AddBar(h2,'Task','9/26/2006','9/29/2006','','B');
ItemBar[h2,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarKeepWorkingCount] := TObject(True);
ItemBar[h2,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarCanResize] := TObject(4);
AddLink('L1',h1,'',h2,'');
Link['L1',EXG2ANTTLib.LinkPropertyEnum.exLinkStartPos] := TObject(2);
Link['L1',EXG2ANTTLib.LinkPropertyEnum.exLinkEndPos] := TObject(0);
Link['L1',EXG2ANTTLib.LinkPropertyEnum.exLinkText] := 'exPreserveBarLength + exIgnoreOriginalInterval<br>exLimitInterval + exLimitIntervalTreatAsWorking';
GroupBars(h1,'',False,h2,'',True,TObject(95),'2');
end;
EndUpdate();
end
|
1226
|
How can I collapse all items
with AxG2antt1 do
begin
BeginUpdate();
LinesAtRoot := EXG2ANTTLib.LinesAtRootEnum.exLinesAtRoot;
Columns.Add('Items');
with Items do
begin
h := AddItem('Root 1');
InsertItem(h,Nil,'Child 1');
InsertItem(h,Nil,'Child 2');
h := AddItem('Root 2');
InsertItem(h,Nil,'Child 1');
InsertItem(h,Nil,'Child 2');
ExpandItem[0] := False;
end;
EndUpdate();
end
|
1225
|
How can I expand all items
with AxG2antt1 do
begin
BeginUpdate();
LinesAtRoot := EXG2ANTTLib.LinesAtRootEnum.exLinesAtRoot;
Columns.Add('Items');
with Items do
begin
h := AddItem('Root 1');
InsertItem(h,Nil,'Child 1');
InsertItem(h,Nil,'Child 2');
h := AddItem('Root 2');
InsertItem(h,Nil,'Child 1');
InsertItem(h,Nil,'Child 2');
ExpandItem[0] := True;
end;
EndUpdate();
end
|
1224
|
How can I specify the distance between bars to be in a specified range of working units

with AxG2antt1 do
begin
BeginUpdate();
Columns.Add('Tasks');
with Chart do
begin
FirstVisibleDate := '9/20/2006';
PaneWidth[False] := 48;
LevelCount := 2;
Bars.Add('Task:Split').Shortcut := 'Task';
end;
with Items do
begin
h1 := AddItem('Task 1');
AddBar(h1,'Task','9/26/2006','9/29/2006','','A');
AddItem('');
AddItem('');
AddItem('');
h2 := AddItem('Task 2');
AddBar(h2,'Task','9/26/2006','9/29/2006','','B');
AddLink('L1',h1,'',h2,'');
Link['L1',EXG2ANTTLib.LinkPropertyEnum.exLinkStartPos] := TObject(2);
Link['L1',EXG2ANTTLib.LinkPropertyEnum.exLinkEndPos] := TObject(0);
Link['L1',EXG2ANTTLib.LinkPropertyEnum.exLinkText] := 'exPreserveBarLength + exIgnoreOriginalInterval<br>exLimitInterval+exLimitIntervalTreatAsWorking';
GroupBars(h1,'',False,h2,'',True,TObject(95),'0;1;5');
ItemBar[0,'<*>',EXG2ANTTLib.ItemBarPropertyEnum.exBarKeepWorkingCount] := TObject(True);
end;
EndUpdate();
end
|
1223
|
How can I specify the distance between bars to be in a specified range

with AxG2antt1 do
begin
BeginUpdate();
Columns.Add('Tasks');
with Chart do
begin
FirstVisibleDate := '9/20/2006';
PaneWidth[False] := 48;
LevelCount := 2;
end;
with Items do
begin
h1 := AddItem('Task 1');
AddBar(h1,'Task','9/26/2006','9/29/2006','','A');
AddItem('');
AddItem('');
AddItem('');
h2 := AddItem('Task 2');
AddBar(h2,'Task','9/26/2006','9/29/2006','','B');
AddLink('L1',h1,'',h2,'');
Link['L1',EXG2ANTTLib.LinkPropertyEnum.exLinkStartPos] := TObject(2);
Link['L1',EXG2ANTTLib.LinkPropertyEnum.exLinkEndPos] := TObject(0);
Link['L1',EXG2ANTTLib.LinkPropertyEnum.exLinkText] := 'exPreserveBarLength + exIgnoreOriginalInterval + exLimitInterval';
GroupBars(h1,'',False,h2,'',True,TObject(31),'0;1;7');
end;
EndUpdate();
end
|
1222
|
How can I specify the distance between bars to be no more than a specified value in working units

with AxG2antt1 do
begin
BeginUpdate();
Columns.Add('Tasks');
with Chart do
begin
FirstVisibleDate := '9/20/2006';
PaneWidth[False] := 48;
LevelCount := 2;
Bars.Add('Task:Split').Shortcut := 'Task';
end;
with Items do
begin
h1 := AddItem('Task 1');
AddBar(h1,'Task','9/26/2006','9/29/2006','','A');
AddItem('');
AddItem('');
AddItem('');
h2 := AddItem('Task 2');
AddBar(h2,'Task','9/26/2006','9/29/2006','','B');
AddLink('L1',h1,'',h2,'');
Link['L1',EXG2ANTTLib.LinkPropertyEnum.exLinkStartPos] := TObject(2);
Link['L1',EXG2ANTTLib.LinkPropertyEnum.exLinkEndPos] := TObject(0);
Link['L1',EXG2ANTTLib.LinkPropertyEnum.exLinkText] := 'exPreserveBarLength + exIgnoreOriginalInterval<br>exLimitInterval+exLimitIntervalTreatAsWorking';
GroupBars(h1,'',False,h2,'',True,TObject(95),'0;0;2');
ItemBar[0,'<*>',EXG2ANTTLib.ItemBarPropertyEnum.exBarKeepWorkingCount] := TObject(True);
end;
EndUpdate();
end
|
1221
|
How can I specify the distance between bars to be no more than a specified value

with AxG2antt1 do
begin
BeginUpdate();
Columns.Add('Tasks');
with Chart do
begin
FirstVisibleDate := '9/20/2006';
PaneWidth[False] := 48;
LevelCount := 2;
end;
with Items do
begin
h1 := AddItem('Task 1');
AddBar(h1,'Task','9/26/2006','9/29/2006','','A');
AddItem('');
AddItem('');
AddItem('');
h2 := AddItem('Task 2');
AddBar(h2,'Task','9/26/2006','9/29/2006','','B');
AddLink('L1',h1,'',h2,'');
Link['L1',EXG2ANTTLib.LinkPropertyEnum.exLinkStartPos] := TObject(2);
Link['L1',EXG2ANTTLib.LinkPropertyEnum.exLinkEndPos] := TObject(0);
Link['L1',EXG2ANTTLib.LinkPropertyEnum.exLinkText] := 'exPreserveBarLength + exIgnoreOriginalInterval + exLimitInterval';
GroupBars(h1,'',False,h2,'',True,TObject(31),'0;0;2');
end;
EndUpdate();
end
|
1220
|
How can I specify the distance between bars to be no less than a specified value in working units

with AxG2antt1 do
begin
BeginUpdate();
Columns.Add('Tasks');
with Chart do
begin
FirstVisibleDate := '9/20/2006';
PaneWidth[False] := 48;
LevelCount := 2;
Bars.Add('Task:Split').Shortcut := 'Task';
end;
with Items do
begin
h1 := AddItem('Task 1');
AddBar(h1,'Task','9/26/2006','9/29/2006','','A');
AddItem('');
AddItem('');
AddItem('');
h2 := AddItem('Task 2');
AddBar(h2,'Task','9/26/2006','9/29/2006','','B');
AddLink('L1',h1,'',h2,'');
Link['L1',EXG2ANTTLib.LinkPropertyEnum.exLinkStartPos] := TObject(2);
Link['L1',EXG2ANTTLib.LinkPropertyEnum.exLinkEndPos] := TObject(0);
Link['L1',EXG2ANTTLib.LinkPropertyEnum.exLinkText] := 'exPreserveBarLength + exIgnoreOriginalInterval<br>exLimitIntervalMin + exLimitIntervalTreatAsWorking';
GroupBars(h1,'',False,h2,'',True,TObject(79),'2');
ItemBar[0,'<*>',EXG2ANTTLib.ItemBarPropertyEnum.exBarKeepWorkingCount] := TObject(True);
end;
EndUpdate();
end
|
1219
|
How can I specify the distance between bars to be no less than a specified value

with AxG2antt1 do
begin
BeginUpdate();
Columns.Add('Tasks');
with Chart do
begin
FirstVisibleDate := '9/20/2006';
PaneWidth[False] := 48;
LevelCount := 2;
end;
with Items do
begin
h1 := AddItem('Task 1');
AddBar(h1,'Task','9/26/2006','9/29/2006','','A');
AddItem('');
AddItem('');
AddItem('');
h2 := AddItem('Task 2');
AddBar(h2,'Task','9/26/2006','9/29/2006','','B');
AddLink('L1',h1,'',h2,'');
Link['L1',EXG2ANTTLib.LinkPropertyEnum.exLinkStartPos] := TObject(2);
Link['L1',EXG2ANTTLib.LinkPropertyEnum.exLinkEndPos] := TObject(0);
Link['L1',EXG2ANTTLib.LinkPropertyEnum.exLinkText] := 'exPreserveBarLength + exIgnoreOriginalInterval + exLimitIntervalMin';
GroupBars(h1,'',False,h2,'',True,TObject(15),'2');
end;
EndUpdate();
end
|
1218
|
How do I specify the distance between bars to be exactly the specified value in working units

with AxG2antt1 do
begin
BeginUpdate();
Columns.Add('Tasks');
with Chart do
begin
FirstVisibleDate := '9/20/2006';
PaneWidth[False] := 48;
LevelCount := 2;
Bars.Add('Task:Split').Shortcut := 'Task';
end;
with Items do
begin
h1 := AddItem('Task 1');
AddBar(h1,'Task','9/26/2006','9/29/2006','','A');
AddItem('');
AddItem('');
AddItem('');
h2 := AddItem('Task 2');
AddBar(h2,'Task','9/26/2006','9/29/2006','','B');
AddLink('L1',h1,'',h2,'');
Link['L1',EXG2ANTTLib.LinkPropertyEnum.exLinkStartPos] := TObject(2);
Link['L1',EXG2ANTTLib.LinkPropertyEnum.exLinkEndPos] := TObject(0);
Link['L1',EXG2ANTTLib.LinkPropertyEnum.exLinkText] := 'exPreserveBarLength + exIgnoreOriginalInterval<br>exLimitInterval + exLimitIntervalTreatAsWorking';
GroupBars(h1,'',False,h2,'',True,TObject(95),'2');
ItemBar[0,'<*>',EXG2ANTTLib.ItemBarPropertyEnum.exBarKeepWorkingCount] := TObject(True);
end;
EndUpdate();
end
|
1217
|
How do I specify the distance between bars to be exactly the specified value

with AxG2antt1 do
begin
BeginUpdate();
Columns.Add('Tasks');
with Chart do
begin
FirstVisibleDate := '9/20/2006';
PaneWidth[False] := 48;
LevelCount := 2;
end;
with Items do
begin
h1 := AddItem('Task 1');
AddBar(h1,'Task','9/26/2006','9/29/2006','','A');
AddItem('');
h2 := AddItem('Task 2');
AddBar(h2,'Unknown','9/26/2006','9/29/2006','','B');
AddLink('L1',h1,'',h2,'');
Link['L1',EXG2ANTTLib.LinkPropertyEnum.exLinkStartPos] := TObject(2);
Link['L1',EXG2ANTTLib.LinkPropertyEnum.exLinkEndPos] := TObject(0);
Link['L1',EXG2ANTTLib.LinkPropertyEnum.exLinkText] := 'exPreserveBarLength + exIgnoreOriginalInterval';
GroupBars(h1,'',False,h2,'',True,TObject(7),'2');
end;
EndUpdate();
end
|
1216
|
How do I specify the day's duration to be working only
with AxG2antt1 do
begin
BeginUpdate();
Columns.Add('Tasks');
Chart.Bars.Add('Task:Split').Shortcut := 'Task';
with Chart do
begin
FirstVisibleDate := '9/20/2006';
PaneWidth[False] := 48;
LevelCount := 2;
end;
with Items do
begin
h1 := AddItem('Task 1');
AddBar(h1,'Task','9/26/2006','9/29/2006','A',Nil);
ItemBar[h1,'A',EXG2ANTTLib.ItemBarPropertyEnum.exBarKeepWorkingCount] := TObject(True);
end;
EndUpdate();
end
|
1215
|
How do I specify the the user can't resize the bar at left side ( starting point )
with AxG2antt1 do
begin
BeginUpdate();
Columns.Add('Tasks');
Chart.Bars.Add('Task:Split').Shortcut := 'Task';
with Chart do
begin
FirstVisibleDate := '9/20/2006';
PaneWidth[False] := 48;
LevelCount := 2;
end;
with Items do
begin
h1 := AddItem('Task 1');
AddBar(h1,'Task','9/26/2006','9/29/2006','A','not resizable on left');
ItemBar[h1,'A',EXG2ANTTLib.ItemBarPropertyEnum.exBarKeepWorkingCount] := TObject(True);
end;
EndUpdate();
end
|
1214
|
How do I specify the the user can't resize the bar at left side ( starting point )
with AxG2antt1 do
begin
BeginUpdate();
Columns.Add('Tasks');
with Chart do
begin
FirstVisibleDate := '9/20/2006';
PaneWidth[False] := 48;
LevelCount := 2;
end;
with Items do
begin
h1 := AddItem('Task 1');
AddBar(h1,'Task','9/26/2006','9/29/2006','A','not resizable on left');
ItemBar[h1,'A',EXG2ANTTLib.ItemBarPropertyEnum.exBarCanResize] := TObject(2);
end;
EndUpdate();
end
|
1213
|
How do I specify the the user can't resize the bar at right side ( ending point )
with AxG2antt1 do
begin
BeginUpdate();
Columns.Add('Tasks');
with Chart do
begin
FirstVisibleDate := '9/20/2006';
PaneWidth[False] := 48;
LevelCount := 2;
end;
with Items do
begin
h1 := AddItem('Task 1');
AddBar(h1,'Task','9/26/2006','9/29/2006','A','not resizable on right');
ItemBar[h1,'A',EXG2ANTTLib.ItemBarPropertyEnum.exBarCanResize] := TObject(1);
end;
EndUpdate();
end
|
1212
|
How do I specify the the user can't resize the bar at runtime
with AxG2antt1 do
begin
BeginUpdate();
Columns.Add('Tasks');
with Chart do
begin
FirstVisibleDate := '9/20/2006';
PaneWidth[False] := 48;
LevelCount := 2;
end;
with Items do
begin
h1 := AddItem('Task 1');
AddBar(h1,'Task','9/26/2006','9/29/2006','A','not resizable');
ItemBar[h1,'A',EXG2ANTTLib.ItemBarPropertyEnum.exBarCanResize] := TObject(False);
end;
EndUpdate();
end
|
1211
|
How do I specify the day's duration to be at least a specified length
with AxG2antt1 do
begin
BeginUpdate();
Columns.Add('Tasks');
with Chart do
begin
FirstVisibleDate := '9/20/2006';
PaneWidth[False] := 48;
LevelCount := 2;
end;
with Items do
begin
h1 := AddItem('Task 1');
AddBar(h1,'Task','9/26/2006','9/29/2006','A','> 2 Days');
ItemBar[h1,'A',EXG2ANTTLib.ItemBarPropertyEnum.exBarMinDuration] := TObject(2);
end;
EndUpdate();
end
|
1210
|
How do I specify the day's duration to be maximum a specified length
with AxG2antt1 do
begin
BeginUpdate();
Columns.Add('Tasks');
with Chart do
begin
FirstVisibleDate := '9/20/2006';
PaneWidth[False] := 48;
LevelCount := 2;
end;
with Items do
begin
h1 := AddItem('Task 1');
AddBar(h1,'Task','9/26/2006','9/29/2006','A','< 3 Days');
ItemBar[h1,'A',EXG2ANTTLib.ItemBarPropertyEnum.exBarMaxDuration] := TObject(3);
end;
EndUpdate();
end
|
1209
|
I am trying to construct a timeline that is not date specific. My timeline starts at T=00:00:00 and then increases by 5 seconds. Is it possible

with AxG2antt1 do
begin
with Chart do
begin
PaneWidth[False] := 0;
FirstVisibleDate := TObject(0);
UnitWidth := 48;
NonworkingDays := 0;
with Level[0] do
begin
Label := '<%hh%>:<%nn%>:<%ss%>';
Unit := EXG2ANTTLib.UnitEnum.exSecond;
Count := 5;
end;
end;
end
|
1208
|
How can I specify the levels using the user's Regional and Language Options

with AxG2antt1 do
begin
BeginUpdate();
Font.Name := 'Arial Unicode MS';
HeaderHeight := 36;
with Chart do
begin
FirstVisibleDate := '5/30/2010';
PaneWidth[False] := 0;
FirstWeekDay := EXG2ANTTLib.WeekDayEnum.exMonday;
UnitWidth := 36;
LevelCount := 2;
with Level[0] do
begin
Label := '<b><%loc_mmmm%></b> <%yyyy%><br><%loc_sdate%><r> <%ww%> ';
ToolTip := Label;
Unit := EXG2ANTTLib.UnitEnum.exWeek;
end;
with Level[1] do
begin
Label := '<%loc_ddd%><br><%d%>';
ToolTip := Label;
end;
ToolTip := '<%loc_ldate%>';
end;
EndUpdate();
end
|
1207
|
How do I arrange, format or layout the item on multiple levels or lines, as a subform

with AxG2antt1 do
begin
BeginUpdate();
Chart.PaneWidth[True] := 0;
Images('gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTql' +
'Vq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0' +
'ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yN' +
'AOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=');
DrawGridLines := EXG2ANTTLib.GridLinesEnum.exRowLines;
HeaderVisible := EXG2ANTTLib.HeaderVisibleEnum.exHeaderHidden;
ItemsAllowSizing := EXG2ANTTLib.ItemsAllowSizingEnum.exResizeItem;
MarkSearchColumn := False;
ScrollBySingleLine := True;
BackColor := Color.FromArgb(255,255,255);
SelBackColor := Color.FromArgb(255,255,255);
(GetOcx() as EXG2ANTTLib.G2antt).SelForeColor := $80000012;
with Columns do
begin
Add('');
var_Column := (Add('Column') as EXG2ANTTLib.Column);
with var_Column do
begin
Visible := False;
Editor.EditType := EXG2ANTTLib.EditTypeEnum.EditType;
end;
var_Column1 := (Add('Column') as EXG2ANTTLib.Column);
with var_Column1 do
begin
Visible := False;
Editor.EditType := EXG2ANTTLib.EditTypeEnum.DropDownType;
end;
var_Column2 := (Add('Column') as EXG2ANTTLib.Column);
with var_Column2 do
begin
Visible := False;
Editor.EditType := EXG2ANTTLib.EditTypeEnum.DropDownType;
end;
var_Column3 := (Add('Column') as EXG2ANTTLib.Column);
with var_Column3 do
begin
Visible := False;
with Editor do
begin
EditType := EXG2ANTTLib.EditTypeEnum.CheckValueType;
Option[EXG2ANTTLib.EditorOptionEnum.exCheckValue2] := TObject(1);
end;
end;
var_Column4 := (Add('Column') as EXG2ANTTLib.Column);
with var_Column4 do
begin
Visible := False;
Editor.EditType := EXG2ANTTLib.EditTypeEnum.DateType;
end;
(Add('Column') as EXG2ANTTLib.Column).Visible := False;
var_Column5 := (Add('Column') as EXG2ANTTLib.Column);
with var_Column5 do
begin
Visible := False;
Editor.EditType := EXG2ANTTLib.EditTypeEnum.DropDownType;
end;
var_Column6 := (Add('Column') as EXG2ANTTLib.Column);
with var_Column6 do
begin
Visible := False;
Def[EXG2ANTTLib.DefColumnEnum.exCellSingleLine] := TObject(0);
var_Editor := Editor;
with var_Editor do
begin
EditType := EXG2ANTTLib.EditTypeEnum.MemoType;
ButtonWidth := 17;
Option[EXG2ANTTLib.EditorOptionEnum.exDownArrow] := TObject(0);
Option[EXG2ANTTLib.EditorOptionEnum.exEndKey] := TObject(0);
Option[EXG2ANTTLib.EditorOptionEnum.exHomeKey] := TObject(0);
Option[EXG2ANTTLib.EditorOptionEnum.exLeftArrow] := TObject(0);
Option[EXG2ANTTLib.EditorOptionEnum.exMemoAutoSize] := TObject(0);
Option[EXG2ANTTLib.EditorOptionEnum.exMemoVScrollBar] := TObject(-1);
Option[EXG2ANTTLib.EditorOptionEnum.exPageDownKey] := TObject(0);
Option[EXG2ANTTLib.EditorOptionEnum.exPageUpKey] := TObject(0);
Option[EXG2ANTTLib.EditorOptionEnum.exRightArrow] := TObject(0);
Option[EXG2ANTTLib.EditorOptionEnum.exUpArrow] := TObject(0);
end;
Visible := False;
end;
(Add('Column') as EXG2ANTTLib.Column).Visible := False;
end;
with Items do
begin
h0 := AddItem('');
CellValue[TObject(h0),TObject(9)] := 'Dismiss';
CellFormatLevel[TObject(h0),TObject(0)] := '12;" "[b=0][bg=RGB(248,248,248)]/(" "[b=0][bg=RGB(248,248,248)]:12,(1;" "[b=0]/(" "[b=0]:1,(25;(5;" "[b=0]/(("Subject:"[b=0]:80,' +
'(1;" "[b=0][bg=RGB(0,0,0)]/(" "[b=0][bg=RGB(0,0,0)]:1,(" "[b=0][bg=RGB(255,0,0)]:5,1[b=0])," "[b=0][bg=RGB(0,0,0)]:1)/1;" "[b=0]' +
'[bg=RGB(0,0,0)]))/1;" "[b=0]))/20;("Location:"[b=0]:80,(1;" "[b=0][bg=RGB(0,0,0)]/(" "[b=0][bg=RGB(0,0,0)]:1,2[b=0]," "[b=0][bg=' +
'RGB(0,0,0)]:1)/1;" "[b=0][bg=RGB(0,0,0)]),((" "[b=0]:10,"Label:"[b=0])):50,(1;" "[b=0][bg=RGB(0,0,0)]/(" "[b=0][bg=RGB(0,0,0)]:1' +
',3[b=0]," "[b=0][bg=RGB(0,0,0)]:1)/1;" "[b=0][bg=RGB(0,0,0)]))/50;(10;" "[b=0]/(1;" "[b=0][bg=RGB(255,0,0)]/("Recurrence:"[b=0]:' +
'80,"Occurs every day effective 20/04/2007 from 01:00 to 01:01."[b=0])/1;" "[b=0][bg=RGB(255,0,0)])/10;" "[b=0])/23;(4[b=0]:20,"R' +
'eminder:"[b=0]:60,(1;" "[b=0][bg=RGB(0,0,0)]/(" "[b=0][bg=RGB(0,0,0)]:1,5[b=0]," "[b=0][bg=RGB(0,0,0)]:1)/1;" "[b=0][bg=RGB(0,0,' +
'0)]),((" "[b=0]:5,6[b=0])):30,((" "[b=0]:10,"Show time as:"[b=0])):90,(1;" "[b=0][bg=RGB(0,0,0)]/(" "[b=0][bg=RGB(0,0,0)]:1,7[b=' +
'0]," "[b=0][bg=RGB(0,0,0)]:1)/1;" "[b=0][bg=RGB(0,0,0)]))/(12;" "[b=0]/(1;" "[b=0][bg=RGB(0,0,0)]/(" "[b=0][bg=RGB(0,0,0)]:1,8[b' +
'=0]," "[b=0][bg=RGB(0,0,0)]:1)/1;" "[b=0][bg=RGB(0,0,0)]))/35;(5;" "[b=0]/(" "[b=0]," "[b=0],((" "[b=0]:40,9[b=0])))/5;" "[b=0])' +
')," "[b=0]:1)/1;" "[b=0])," "[b=0][bg=RGB(248,248,248)]:12)/12;" "[b=0][bg=RGB(248,248,248)]';
CellHasCheckBox[TObject(h0),TObject(4)] := True;
CellHasButton[TObject(h0),TObject(9)] := True;
CellHAlignment[TObject(h0),TObject(9)] := EXG2ANTTLib.AlignmentEnum.CenterAlignment;
CellVAlignment[TObject(h0),TObject(8)] := EXG2ANTTLib.VAlignmentEnum.exTop;
CellForeColor[TObject(h0),TObject(8)] := $0;
CellHasButton[TObject(h0),TObject(6)] := True;
CellValue[TObject(h0),TObject(6)] := '<img>1</img>';
CellValueFormat[TObject(h0),TObject(6)] := EXG2ANTTLib.ValueFormatEnum.exHTML;
CellHAlignment[TObject(h0),TObject(6)] := EXG2ANTTLib.AlignmentEnum.CenterAlignment;
ItemHeight[h0] := 296;
end;
EndUpdate();
end
|
1206
|
How can I arrange the columns on multiple levels

with AxG2antt1 do
begin
BeginUpdate();
DefaultItemHeight := 48;
with Columns do
begin
(Add('Title') as EXG2ANTTLib.Column).Visible := False;
(Add('FirstName') as EXG2ANTTLib.Column).Visible := False;
(Add('LastName') as EXG2ANTTLib.Column).Visible := False;
(Add('Photo') as EXG2ANTTLib.Column).Visible := False;
with (Add('Address') as EXG2ANTTLib.Column) do
begin
Visible := False;
Def[EXG2ANTTLib.DefColumnEnum.exCellSingleLine] := TObject(False);
end;
with (Add('Personal Info') as EXG2ANTTLib.Column) do
begin
FormatLevel := '3:48,(0/1/2),4:96';
Def[EXG2ANTTLib.DefColumnEnum.exCellFormatLevel] := '3:48,(0/1/2),4:96';
end;
end;
Chart.FirstVisibleDate := '1/1/2010';
Chart.Bars.Item['Task'].OverlaidType := Integer(EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStackAutoArrange) Or Integer(EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStack);
with Items do
begin
h := AddItem('Sales Representative');
CellValue[TObject(h),TObject(1)] := 'Nancy';
CellValue[TObject(h),TObject(2)] := 'Davolio';
CellPicture[TObject(h),TObject(3)] := AxG2antt1.ExecuteTemplate('loadpicture(`c:\exontrol\images\zipdisk.gif`)');
CellValue[TObject(h),TObject(4)] := '507-20th Ave. E.Apt. 2A';
AddBar(h,'Task','1/1/2010','1/5/2010',TObject(2),TObject(2));
AddBar(h,'Task','1/4/2010','1/8/2010',TObject(1),TObject(1));
end;
EndUpdate();
end
|
1205
|
Is it possible to display a bar only using a gradient color using the exBarColor option

with AxG2antt1 do
begin
BeginUpdate();
with Chart do
begin
FirstVisibleDate := '12/31/2009';
LevelCount := 2;
PaneWidth[False] := 96;
with Bars.Item['Task'] do
begin
StartColor := $ffffff;
EndColor := StartColor;
Height := 17;
end;
end;
Columns.Add('Types');
with Items do
begin
AddBar(AddItem('Original'),'Task','1/4/2010','1/9/2010','',Nil);
h := AddItem('W/h Gradient');
AddBar(h,'Task','1/4/2010','1/9/2010','',Nil);
ItemBar[h,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarPattern] := TObject(227);
h := AddItem('W/h Color');
AddBar(h,'Task','1/4/2010','1/9/2010','',Nil);
ItemBar[h,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarPattern] := TObject(227);
ItemBar[h,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarColor] := TObject(255);
AddBar(AddItem('Original'),'Task','1/4/2010','1/9/2010','',Nil);
end;
EndUpdate();
end
|
1204
|
Is it possible to display a bar only using a gradient color

with AxG2antt1 do
begin
BeginUpdate();
with Chart do
begin
FirstVisibleDate := '12/31/2009';
LevelCount := 2;
PaneWidth[False] := 96;
with Bars.Item['Task'] do
begin
StartColor := $ffffff;
EndColor := StartColor;
Height := 17;
end;
end;
Columns.Add('Types');
with Items do
begin
AddBar(AddItem('Original'),'Task','1/4/2010','1/9/2010','',Nil);
h := AddItem('W/h Gradient');
AddBar(h,'Task','1/4/2010','1/9/2010','',Nil);
ItemBar[h,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarPattern] := TObject(227);
AddBar(AddItem('Original'),'Task','1/4/2010','1/9/2010','',Nil);
end;
EndUpdate();
end
|
1203
|
Is it possible to display a bar only using a gradient color

with AxG2antt1 do
begin
BeginUpdate();
with Chart do
begin
FirstVisibleDate := '12/31/2009';
LevelCount := 2;
PaneWidth[False] := 96;
with Bars.Item['Task'] do
begin
StartColor := $ffffff;
EndColor := Color;
end;
end;
Columns.Add('Types');
with Items do
begin
AddBar(AddItem('Original'),'Task','1/4/2010','1/9/2010','',Nil);
h := AddItem('W/h Gradient');
AddBar(h,'Task','1/4/2010','1/9/2010','',Nil);
ItemBar[h,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarPattern] := TObject(99);
AddBar(AddItem('Original'),'Task','1/4/2010','1/9/2010','',Nil);
end;
EndUpdate();
end
|
1202
|
How can I display a specified bar only with a thicker border

with AxG2antt1 do
begin
BeginUpdate();
with Chart do
begin
FirstVisibleDate := '12/31/2009';
LevelCount := 2;
PaneWidth[False] := 96;
end;
Columns.Add('Types');
with Items do
begin
AddBar(AddItem('Original'),'Task','1/4/2010','1/9/2010','',Nil);
h := AddItem('W/h Border');
AddBar(h,'Task','1/4/2010','1/9/2010','',Nil);
ItemBar[h,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarPattern] := TObject(4099);
AddBar(AddItem('Original'),'Task','1/4/2010','1/9/2010','',Nil);
end;
EndUpdate();
end
|
1201
|
Is it possible to display the shadow for a specified bar

with AxG2antt1 do
begin
BeginUpdate();
with Chart do
begin
FirstVisibleDate := '12/31/2009';
LevelCount := 2;
PaneWidth[False] := 96;
end;
Columns.Add('Types');
with Items do
begin
AddBar(AddItem('Original'),'Task','1/4/2010','1/9/2010','',Nil);
h := AddItem('W/h Shadow');
AddBar(h,'Task','1/4/2010','1/9/2010','',Nil);
ItemBar[h,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarPattern] := TObject(8195);
AddBar(AddItem('Original'),'Task','1/4/2010','1/9/2010','',Nil);
end;
EndUpdate();
end
|